diff --git a/accumulo/src/main/conf/accumulo.properties b/accumulo/src/main/conf/accumulo.properties new file mode 100644 index 0000000000000000000000000000000000000000..191ad416d25b2b14531925c1b76a5ba4cbf6870a --- /dev/null +++ b/accumulo/src/main/conf/accumulo.properties @@ -0,0 +1,44 @@ +# Copyright 2014 Cloudera, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. +# +# Sample Accumulo configuration properties +# +# You may either set properties here or via the command line. +# + +# This will influence the keys we write +accumulo.columnFamily=YCSB + +# This should be set based on your Accumulo cluster +#accumulo.instanceName=ExampleInstance + +# Comma separated list of host:port tuples for the ZooKeeper quorum used +# by your Accumulo cluster +#accumulo.zooKeepers=zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181 + +# This user will need permissions on the table YCSB works against +#accumulo.username=ycsb +#accumulo.password=protectyaneck + +# Controls how long our client writer will wait to buffer more data +# measured in milliseconds +accumulo.batchWriterMaxLatency=30000 + +# Controls how much data our client will attempt to buffer before sending +# measured in bytes +accumulo.batchWriterSize=100000 + +# Controls how many worker threads our client will use to parallelize writes +accumulo.batchWriterThreads=1 diff --git a/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java b/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java index 9867ca4b134aee2cc02f87ee2e8602ae709cdd7c..c397573b17739b71774ba56669b99e22c3bf9928 100644 --- a/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java +++ b/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java @@ -137,7 +137,8 @@ public class AccumuloClient extends DB { long bwSize = Long.parseLong(getProperties().getProperty("accumulo.batchWriterSize", "100000")); long bwMaxLatency = Long.parseLong(getProperties().getProperty("accumulo.batchWriterMaxLatency", "30000")); - _bw = _connector.createBatchWriter(table, bwSize, bwMaxLatency, 1); + int bwThreads = Integer.parseInt(getProperties().getProperty("accumulo.batchWriterThreads", "1")); + _bw = _connector.createBatchWriter(table, bwSize, bwMaxLatency, bwThreads); // Create our scanners _singleScanner = _connector.createScanner(table, Constants.NO_AUTHS); _scanScanner = _connector.createScanner(table, Constants.NO_AUTHS);