keyspace.createColumnFamily(CF_CHECKPOINTS, null);
KeyspaceDefinition ki = keyspaceContext.getEntity().describeKeyspace();
System.out.println("Describe Keyspace: " + ki.getName());
MutationBatch m;
try {
m = keyspace.prepareMutationBatch();
// Add 10 rows
for (long i = 0; i < 10; i++) {
m.withRow(CF_ALL_ROWS, i)
.putColumn("A", 1)
.putColumn("B", 1)
;
}
// Add 10 rows
for (long i = 10; i < 20; i++) {
m.withRow(CF_ALL_ROWS, i)
.putColumn("B", 1)
.putColumn("C", 1)
;
}
// Add 10 rows
for (long i = 20; i < 30; i++) {
m.withRow(CF_ALL_ROWS, i)
.putColumn("B", 1)
.putColumn("C", 1)
;
}
for (long i = 0; i < 100; i++) {
m.withRow(CF_ALL_ROWS_TOMBSTONE, i)
.delete()
;
}
m.execute();
m = keyspace.prepareMutationBatch();
// Delete 7
for (long i = 0; i < 20; i += 3) {
m.withRow(CF_ALL_ROWS, i)
.delete();
}
// Delete 10
for (long i = 20; i < 30; i ++ ) {
m.withRow(CF_ALL_ROWS, i)
.delete();
}
// CF_ALL_ROWS should have 13 rows + 17 tombstones
m.execute();
// Add 10,000 rows
m = keyspace.prepareMutationBatch();
for (long i = 0; i < LOTS_OF_ROWS_COUNT; i++) {
m.withRow(CF_LOTS_OF_ROWS, i).putColumn("DATA", "TEST" + i);
}
m.execute();
} catch (Exception e) {
System.out.println(e.getMessage());
Assert.fail();