diff --git a/kudu/README.md b/kudu/README.md index e7c4fa0127f7e1b3e715f330b7acc8f3491c3ac4..cd5cffd6387a0d92a8327638a1a1d72c1f70d949 100644 --- a/kudu/README.md +++ b/kudu/README.md @@ -34,12 +34,11 @@ Additional configurations: uses 4 tablets. A good rule of thumb is to use 5 per tablet server. * `kudu_table_num_replicas`: The number of replicas that each tablet will have. The default is 3. Should only be configured to use 1 instead, for single node tests. -* `kudu_sync_ops`: If the client should buffer data before sending it. The default is false. Should -always be set to true for the run phase. +* `kudu_sync_ops`: If the client should wait after every write operation. The default is true. * `kudu_block_size`: The data block size used to configure columns. The default is 4096 bytes. Then, you can run the workload: ``` -bin/ycsb run kudu -P workloads/workloada -p kudu_sync_ops=true +bin/ycsb run kudu -P workloads/workloada ``` diff --git a/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java b/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java index d467f4528c34d9170ff3432e95f301f0bcd5abcc..9e65407a826507d11da6c4b447ed494f56270bc5 100644 --- a/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java +++ b/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java @@ -84,13 +84,13 @@ public class KuduYCSBClient extends com.yahoo.ycsb.DB { initClient(debug, tableName, getProperties()); this.session = client.newSession(); if (getProperties().getProperty(SYNC_OPS_OPT) != null && - getProperties().getProperty(SYNC_OPS_OPT).equals("true")) { - this.session.setFlushMode(KuduSession.FlushMode.AUTO_FLUSH_SYNC); - } else { + getProperties().getProperty(SYNC_OPS_OPT).equals("false")) { this.session.setFlushMode(KuduSession.FlushMode.AUTO_FLUSH_BACKGROUND); + this.session.setMutationBufferSpace(100); + } else { + this.session.setFlushMode(KuduSession.FlushMode.AUTO_FLUSH_SYNC); } - this.session.setMutationBufferSpace(100); try { this.table = client.openTable(tableName); } catch (Exception e) {