Skip to content

Commit

Permalink
Merge pull request #31 from jblang/master
Browse files Browse the repository at this point in the history
Fix batch consistency level bug
  • Loading branch information
vinaykumarchella authored Jun 12, 2017
2 parents 7b92b7e + b5b18bb commit c9964ca
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 c9964ca

Please sign in to comment.