Merge branch 'cassandra-2.1' into trunk

This commit is contained in:
Jake Luciani 2014-10-06 10:38:03 -04:00
commit bc246e1326
2 changed files with 14 additions and 4 deletions

View File

@ -271,10 +271,13 @@ public class Partition
tosort.add((Comparable) generator.generate());
Collections.sort(tosort);
for (int i = 0 ; i < count ; i++)
if (i == 0 || tosort.get(i - 1).compareTo(i) < 0)
queue.add(tosort.get(i));
queue.add(tosort.get(i));
break;
}
else
{
throw new RuntimeException("Generator class is not comparable: "+generator.clazz);
}
case ARBITRARY:
unique.clear();
for (int i = 0 ; i < count ; i++)

View File

@ -84,7 +84,7 @@ public class SchemaInsert extends SchemaStatement
// 65535 is max number of stmts per batch, so if we have more, we need to manually batch them
for (int j = 0 ; j < stmts.size() ; j += 65535)
{
List<BoundStatement> substmts = stmts.subList(j, Math.min(stmts.size(), j + 65535));
List<BoundStatement> substmts = stmts.subList(j, Math.min(j + stmts.size(), j + 65535));
Statement stmt;
if (stmts.size() == 1)
{
@ -98,7 +98,14 @@ public class SchemaInsert extends SchemaStatement
stmt = batch;
}
validate(client.getSession().execute(stmt));
try
{
validate(client.getSession().execute(stmt));
}
catch (ClassCastException e)
{
e.printStackTrace();
}
}
for (Partition.RowIterator iterator : iterators)