Skip to content

Commit

Permalink
Fix batch consistency level bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jblang committed Jun 12, 2017
1 parent 7b92b7e commit b5b18bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ public String readSingle(String key) throws Exception {

@Override
public String writeSingle(String key) throws Exception {
BatchStatement batch = new BatchStatement();
BatchStatement batch = new BatchStatement(BatchStatement.Type.UNLOGGED);
for (int i = 0; i < this.MaxColCount; i++) {
BoundStatement bStmt = writePstmt.bind();
bStmt.setString("key", key);
bStmt.setInt("column1", i);
bStmt.setString("value", this.dataGenerator.getRandomValue());
bStmt.setConsistencyLevel(this.WriteConsistencyLevel);
batch.add(bStmt);
}
batch.setConsistencyLevel(this.WriteConsistencyLevel);
session.execute(batch);
batch.clear();
return ResultOK;
Expand Down

0 comments on commit b5b18bb

Please sign in to comment.