master 951357dbafd5 cached
384 files
1.6 MB
417.0k tokens
1430 symbols
1 requests
Download .txt
Showing preview only (1,797K chars total). Download the full file or copy to clipboard to get everything.
Repository: cld378632668/YCSB_leveldb_leveldbjni_rocksdb
Branch: master
Commit: 951357dbafd5
Files: 384
Total size: 1.6 MB

Directory structure:
gitextract_7z7eehwx/

├── .editorconfig
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE.txt
├── NOTICE.txt
├── README.md
├── Todo.md
├── accumulo1.6/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   └── accumulo.properties
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── accumulo/
│       │                           ├── AccumuloClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── accumulo/
│           │                       └── AccumuloTest.java
│           └── resources/
│               └── log4j.properties
├── accumulo1.7/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   └── accumulo.properties
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── accumulo/
│       │                           ├── AccumuloClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── accumulo/
│           │                       └── AccumuloTest.java
│           └── resources/
│               └── log4j.properties
├── accumulo1.8/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   └── accumulo.properties
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── accumulo/
│       │                           ├── AccumuloClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── accumulo/
│           │                       └── AccumuloTest.java
│           └── resources/
│               └── log4j.properties
├── aerospike/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── AerospikeClient.java
│                               └── package-info.java
├── arangodb/
│   ├── .gitignore
│   ├── README.md
│   ├── conf/
│   │   └── logback.xml
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── ArangoDBClient.java
│                               └── package-info.java
├── arangodb3/
│   ├── .gitignore
│   ├── README.md
│   ├── conf/
│   │   └── logback.xml
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── arangodb/
│                                   ├── ArangoDB3Client.java
│                                   └── package-info.java
├── asynchbase/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── AsyncHBaseClient.java
│       │                       └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       ├── google/
│           │       │   └── common/
│           │       │       ├── base/
│           │       │       │   └── Stopwatch.java
│           │       │       └── io/
│           │       │           ├── Closeables.java
│           │       │           └── LimitInputStream.java
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── AsyncHBaseTest.java
│           └── resources/
│               ├── hbase-site.xml
│               └── log4j.properties
├── azuredocumentdb/
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── azuredocumentdb/
│                                   ├── AzureDocumentDBClient.java
│                                   └── package-info.java
├── azuretablestorage/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── azuretablestorage/
│                                   ├── AzureClient.java
│                                   └── package-info.java
├── bin/
│   ├── bindings.properties
│   ├── ycsb
│   ├── ycsb.bat
│   └── ycsb.sh
├── binding-parent/
│   ├── datastore-specific-descriptor/
│   │   ├── pom.xml
│   │   └── src/
│   │       └── main/
│   │           └── resources/
│   │               └── assemblies/
│   │                   └── datastore-specific-assembly.xml
│   └── pom.xml
├── cassandra/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── CassandraCQLClient.java
│       │                       └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── CassandraCQLClientTest.java
│           └── resources/
│               └── ycsb.cql
├── checkstyle.xml
├── cloudspanner/
│   ├── README.md
│   ├── conf/
│   │   └── cloudspanner.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── cloudspanner/
│                                   ├── CloudSpannerClient.java
│                                   └── package-info.java
├── core/
│   ├── CHANGES.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               ├── BasicDB.java
│       │   │               ├── BasicTSDB.java
│       │   │               ├── ByteArrayByteIterator.java
│       │   │               ├── ByteIterator.java
│       │   │               ├── Client.java
│       │   │               ├── CommandLine.java
│       │   │               ├── DB.java
│       │   │               ├── DBException.java
│       │   │               ├── DBFactory.java
│       │   │               ├── DBWrapper.java
│       │   │               ├── GoodBadUglyDB.java
│       │   │               ├── InputStreamByteIterator.java
│       │   │               ├── NumericByteIterator.java
│       │   │               ├── RandomByteIterator.java
│       │   │               ├── Status.java
│       │   │               ├── StringByteIterator.java
│       │   │               ├── TerminatorThread.java
│       │   │               ├── UnknownDBException.java
│       │   │               ├── Utils.java
│       │   │               ├── Workload.java
│       │   │               ├── WorkloadException.java
│       │   │               ├── generator/
│       │   │               │   ├── AcknowledgedCounterGenerator.java
│       │   │               │   ├── ConstantIntegerGenerator.java
│       │   │               │   ├── CounterGenerator.java
│       │   │               │   ├── DiscreteGenerator.java
│       │   │               │   ├── ExponentialGenerator.java
│       │   │               │   ├── FileGenerator.java
│       │   │               │   ├── Generator.java
│       │   │               │   ├── HistogramGenerator.java
│       │   │               │   ├── HotspotIntegerGenerator.java
│       │   │               │   ├── IncrementingPrintableStringGenerator.java
│       │   │               │   ├── NumberGenerator.java
│       │   │               │   ├── RandomDiscreteTimestampGenerator.java
│       │   │               │   ├── ScrambledZipfianGenerator.java
│       │   │               │   ├── SequentialGenerator.java
│       │   │               │   ├── SkewedLatestGenerator.java
│       │   │               │   ├── UniformGenerator.java
│       │   │               │   ├── UniformLongGenerator.java
│       │   │               │   ├── UnixEpochTimestampGenerator.java
│       │   │               │   ├── ZipfianGenerator.java
│       │   │               │   └── package-info.java
│       │   │               ├── measurements/
│       │   │               │   ├── Measurements.java
│       │   │               │   ├── OneMeasurement.java
│       │   │               │   ├── OneMeasurementHdrHistogram.java
│       │   │               │   ├── OneMeasurementHistogram.java
│       │   │               │   ├── OneMeasurementRaw.java
│       │   │               │   ├── OneMeasurementTimeSeries.java
│       │   │               │   ├── TwoInOneMeasurement.java
│       │   │               │   ├── exporter/
│       │   │               │   │   ├── JSONArrayMeasurementsExporter.java
│       │   │               │   │   ├── JSONMeasurementsExporter.java
│       │   │               │   │   ├── MeasurementsExporter.java
│       │   │               │   │   ├── TextMeasurementsExporter.java
│       │   │               │   │   └── package-info.java
│       │   │               │   └── package-info.java
│       │   │               ├── package-info.java
│       │   │               └── workloads/
│       │   │                   ├── ConstantOccupancyWorkload.java
│       │   │                   ├── CoreWorkload.java
│       │   │                   ├── RestWorkload.java
│       │   │                   ├── TimeSeriesWorkload.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       └── project.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           ├── TestByteIterator.java
│                           ├── TestNumericByteIterator.java
│                           ├── TestStatus.java
│                           ├── TestUtils.java
│                           ├── generator/
│                           │   ├── AcknowledgedCounterGeneratorTest.java
│                           │   ├── TestIncrementingPrintableStringGenerator.java
│                           │   ├── TestRandomDiscreteTimestampGenerator.java
│                           │   ├── TestUnixEpochTimestampGenerator.java
│                           │   └── TestZipfianGenerator.java
│                           ├── measurements/
│                           │   └── exporter/
│                           │       └── TestMeasurementsExporter.java
│                           └── workloads/
│                               ├── TestCoreWorkload.java
│                               └── TestTimeSeriesWorkload.java
├── couchbase/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── CouchbaseClient.java
│                               └── package-info.java
├── couchbase2/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── couchbase2/
│                                   ├── Couchbase2Client.java
│                                   └── package-info.java
├── distribution/
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── assembly/
│               └── distribution.xml
├── doc/
│   ├── coreproperties.html
│   ├── coreworkloads.html
│   ├── dblayer.html
│   ├── index.html
│   ├── parallelclients.html
│   ├── tipsfaq.html
│   └── workload.html
├── dynamodb/
│   ├── README.md
│   ├── conf/
│   │   ├── AWSCredentials.properties
│   │   └── dynamodb.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── DynamoDBClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── log4j.properties
├── elasticsearch/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── ElasticsearchClient.java
│       │                       └── package-info.java
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── ElasticsearchClientTest.java
├── elasticsearch5/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── elasticsearch5/
│       │   │                       ├── Elasticsearch5.java
│       │   │                       ├── ElasticsearchClient.java
│       │   │                       ├── ElasticsearchRestClient.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── log4j2.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── elasticsearch5/
│                                   ├── ElasticsearchClientIT.java
│                                   ├── ElasticsearchIntegTestBase.java
│                                   └── ElasticsearchRestClientIT.java
├── geode/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── GeodeClient.java
│                               └── package-info.java
├── googlebigtable/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── GoogleBigtableClient.java
│                               └── package-info.java
├── googledatastore/
│   ├── README.md
│   ├── conf/
│   │   └── googledatastore.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── GoogleDatastoreClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── log4j.properties
├── hbase098/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── HBaseClient.java
│                               └── package-info.java
├── hbase10/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── HBaseClient10.java
│       │                       └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── HBaseClient10Test.java
│           └── resources/
│               ├── hbase-site.xml
│               └── log4j.properties
├── hbase12/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── hbase12/
│       │                           ├── HBaseClient12.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── hbase12/
│           │                       └── HBaseClient12Test.java
│           └── resources/
│               ├── hbase-site.xml
│               └── log4j.properties
├── hypertable/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── HypertableClient.java
│                               └── package-info.java
├── infinispan/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── infinispan-config.xml
│           │   └── remote-cache.properties
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── InfinispanClient.java
│                               ├── InfinispanRemoteClient.java
│                               ├── RemoteCacheManagerHolder.java
│                               └── package-info.java
├── jdbc/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   ├── db.properties
│       │   │   └── h2.properties
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   ├── JdbcDBCli.java
│       │   │                   ├── JdbcDBClient.java
│       │   │                   ├── JdbcDBCreateTable.java
│       │   │                   ├── StatementType.java
│       │   │                   ├── flavors/
│       │   │                   │   ├── DBFlavor.java
│       │   │                   │   ├── DefaultDBFlavor.java
│       │   │                   │   ├── PhoenixDBFlavor.java
│       │   │                   │   └── package-info.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       └── sql/
│       │           ├── README.md
│       │           ├── create_table.mysql
│       │           └── create_table.sql
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── JdbcDBClientTest.java
├── kudu/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   └── log4j.properties
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── KuduYCSBClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── log4j.properties
├── leveldb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── LevelDbClient.java
├── leveldbjni/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── LevelDbJniClient.java
├── mapkeeper/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── MapKeeperClient.java
├── memcached/
│   ├── README.md
│   ├── conf/
│   │   └── memcached.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── MemcachedClient.java
│                               └── package-info.java
├── mongodb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   ├── AsyncMongoDbClient.java
│       │   │                   ├── MongoDbClient.java
│       │   │                   ├── OptionsSupport.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       ├── log4j.properties
│       │       └── logback.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── AbstractDBTestCases.java
│                               ├── AsyncMongoDbClientTest.java
│                               ├── MongoDbClientTest.java
│                               └── OptionsSupportTest.java
├── nosqldb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── nosqldb.properties
│           │   └── script.txt
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── NoSqlDbClient.java
│                               └── package-info.java
├── orientdb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   ├── OrientDBClient.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       └── log4j.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── OrientDBClientTest.java
├── pom.xml
├── rados/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── RadosClient.java
│       │                       └── package-info.java
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── RadosClientTest.java
├── redis/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── RedisClient.java
│                               └── package-info.java
├── rest/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── webservice/
│       │                       └── rest/
│       │                           ├── RestClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── webservice/
│           │                   └── rest/
│           │                       ├── IntegrationTest.java
│           │                       ├── ResourceLoader.java
│           │                       ├── RestClientTest.java
│           │                       ├── RestTestResource.java
│           │                       └── Utils.java
│           └── resources/
│               ├── WebContent/
│               │   └── index.html
│               ├── error_trace.txt
│               ├── trace.txt
│               └── workload_rest
├── riak/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── riak/
│       │   │                       ├── RiakKVClient.java
│       │   │                       ├── RiakUtils.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── riak.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── riak/
│                                   └── RiakKVClientTest.java
├── rocksdb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── RocksdbClient.java
├── s3/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   └── s3.properties
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── S3Client.java
│                               └── package-info.java
├── solr/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── solr/
│       │   │                       ├── SolrClient.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── log4j.properties
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── solr/
│           │                       ├── SolrClientBaseTest.java
│           │                       ├── SolrClientCloudTest.java
│           │                       └── SolrClientTest.java
│           └── resources/
│               ├── log4j.properties
│               └── solr_config/
│                   ├── schema.xml
│                   └── solrconfig.xml
├── solr6/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── solr6/
│       │   │                       ├── SolrClient.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── log4j.properties
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── solr6/
│           │                       ├── SolrClientBaseTest.java
│           │                       ├── SolrClientCloudTest.java
│           │                       └── SolrClientTest.java
│           └── resources/
│               ├── log4j.properties
│               └── solr_config/
│                   ├── schema.xml
│                   └── solrconfig.xml
├── tarantool/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── tarantool-hash.lua
│           │   └── tarantool-tree.lua
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── TarantoolClient.java
│                               └── package-info.java
├── voldemort/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── cluster.xml
│           │   ├── server.properties
│           │   └── stores.xml
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── VoldemortClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── config/
│                   ├── cluster.xml
│                   ├── server.properties
│                   └── stores.xml
└── workloads/
    ├── tsworkload_template
    ├── tsworkloada
    ├── workload_template
    ├── workloada
    ├── workloadb
    ├── workloadc
    ├── workloadd
    ├── workloade
    └── workloadf

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
# For more info, see: http://EditorConfig.org
root = true

[*.java]
indent_style = space
indent_size = 2
continuation_indent_size = 4

[*.md]
indent_style = space
indent_size = 2
continuation_indent_size = 4

[*.xml]
indent_style = space
indent_size = 2
continuation_indent_size = 4


================================================
FILE: .gitignore
================================================
# ignore compiled byte code
target

# ignore output files from testing
output*

# ignore standard Eclipse files
.project
.classpath
.settings
.checkstyle

# ignore standard IntelliJ files
.idea/
*.iml
*.ipr
*.iws

# ignore standard Vim and Emacs temp files
*.swp
*~

# ignore standard Mac OS X files/dirs
.DS_Store


================================================
FILE: .travis.yml
================================================
# Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors. 
# 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.

# more info here about TravisCI and Java projects
# http://docs.travis-ci.com/user/languages/java/

language: java

jdk:
  - oraclejdk9
  - oraclejdk8
  - openjdk7

addons:
  hosts:
    - myshorthost
  hostname: myshorthost

install: mvn install -q -DskipTests=true

script: mvn test -q

# Services to start for tests.
services:
  - mongodb
# temporarily disable riak. failing, docs offline.
#  - riak


# Can't use container based infra because of hosts/hostname
sudo: true


================================================
FILE: CONTRIBUTING.md
================================================
<!--
Copyright (c) 2017 YCSB contributors.
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.
-->
## How To Contribute

As more and more databases are created to handle distributed or "cloud" workloads, YCSB needs contributors to write clients to test them. And of course we always need bug fixes, updates for existing databases and new features to keep YCSB going. Here are some guidelines to follow when digging into the code.

## Project Source

YCSB is located in a Git repository hosted on GitHub at [https://github.com/brianfrankcooper/YCSB](https://github.com/brianfrankcooper/YCSB). To modify the code, fork the main repo into your own GitHub account or organization and commit changes there.

YCSB is written in Java (as most of the new cloud data stores at beginning of the project were written in Java) and is laid out as a multi-module Maven project. You should be able to import the project into your favorite IDE or environment easily. For more details about the Maven layout see the [Guide to Working with Multiple Modules](https://maven.apache.org/guides/mini/guide-multiple-modules.html).

## Licensing

YCSB is licensed under the Apache License, Version 2.0 (APL2). Every file included in the project must include the APL header. For example, each Java source file must have a header similar to the following:

```java
/**
 * Copyright (c) 2015-2017 YCSB contributors. All rights reserved.
 * <p>
 * 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
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * 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.
 */ 
```

When modifying files that already have a license header, please update the year when you made your edits. E.g. change ``Copyright (c) 2010 Yahoo! Inc., 2012 - 2016 YCSB contributors.`` to ``Copyright (c) 2010 Yahoo! Inc., 2012 - 2017 YCSB contributors.`` If the file only has ``Copyright (c) 2010 Yahoo! Inc.``, append the current year as in ``Copyright (c) 2010 Yahoo! Inc., 2017 YCSB contributors.``.

**WARNING**: It should go without saying, but don't copy and paste code from outside authors or sources. If you are a database author and want to copy some example code, it must be APL2 compatible.

Client bindings to non-APL databases are perfectly acceptable, as data stores are meant to be used from all kinds of projects. Just make sure not to copy any code or commit libraries or binaries into the YCSB code base. Link to them in the Maven pom file.

## Issues and Support

To track bugs, feature requests and releases we use GitHub's integrated [Issues](https://github.com/brianfrankcooper/YCSB/issues). If you find a bug or problem, open an issue with a descriptive title and as many details as you can give us in the body (stack traces, log files, etc). Then if you can create a fix, follow the PR guidelines below.

**Note** Before embarking on a code change or DB, search through the existing issues and pull requests to see if anyone is already working on it. Reach out to them if so.

For general support, please use the mailing list hosted (of course) with Yahoo groups at [http://groups.yahoo.com/group/ycsb-users](http://groups.yahoo.com/group/ycsb-users).

## Code Style

A Java coding style guide is enforced via the Maven CheckStyle plugin. We try not to be too draconian with enforcement but the biggies include:

* Whitespaces instead of tabs.
* Proper Javadocs for methods and classes.
* Camel case member names.
* Upper camel case classes and method names.
* Line length.

CheckStyle will run for pull requests or if you create a package locally so if you just compile and push a commit, you may be surprised when the build fails with a style issue. Just execute ``mvn checkstyle:checkstyle `` before you open a PR and you should avoid any suprises.

## Platforms

Since most data bases aim to support multiple platforms, YCSB aims to run on as many as possible as well. Besides **Linux** and **macOS**, YCSB must compile and run for **Windows**. While not all DBs will run under every platform, the YCSB tool itself must be able to execute on all of these systems and hopefully be able to communicate with remote data stores.

Additionally, YCSB is targeting Java 7 (1.7.0) as its build version as some users are glacially slow moving to Java 8. So please avoid those Lambdas and Streams for now.

## Pull Requests

You've written some amazing code and are excited to share it with the community! It's time to open a PR! Here's what you should do.

* Checkout YCSB's ``master`` branch in your own fork and create a new branch based off of it with a name that is reflective of your work. E.g. ``i123`` for fixing an issue or ``db_xyz`` when working on a binding.
* Add your changes to the branch.
* Commit the code and start the commit message with the component you are working on in square braces. E.g. ``[core] Add another format for exporting histograms.`` or ``[hbase12] Fix interrupted exception bug.``.
* Push to your fork and click the ``Create Pull Request`` button.
* Wait for the build to complete in the CI pipeline. If it fails with a red X, click through the logs for details and fix any issues and commit your changes.
* If you have made changes, please flatten the commits so that the commit logs are nice and clean. Just run a ``git rebase -i <hash before your first commit>``. 

After you have opened your PR, a YCSB maintainer will review it and offer constructive feedback via the GitHub review feature. If no one has responded to your PR, please bump the thread by adding comments.

**NOTE**: For maintainers, please get another maintainer to sign off on your changes before merging a PR. And if you're writing code, please do create a PR from your fork, don't just push code directly to the master branch.

## Core, Bindings and Workloads

The main components of the code base include the core library and benchmarking utility, various database client bindings and workload classes and definitions.

### Core
When working on the core classes, keep in mind the following:

* Do not change the core behavior or operation of the main benchmarking classes (Particularly the Client and Workload classes). YCSB is used all over the place because it's a consistent standard that allows different users to compare results with the same workloads. If you find a way to drastically improve throughput, that's great! But please check with the rest of the maintainers to see if we can add the tweaks without invalidating years of benchmarks.
* Do not remove or modify measurements. Users may have tooling to parse the outputs so if you take something out, they'll be a wee bit unhappy. Extending or adding measurements is fine (so if you do have tooling, expect additions.)
* Do not modify existing generators. Again we don't want to invalidate years of benchmarks. Instead, create a new generator or option that can be enabled explicitly (not implicitly!) for users to try out.
* Utility classes and methods are welcome. But if they're only ever used by a specific database binding, co-locate the code with that binding.
* Don't change the DB interface if at all possible. Implementations can squeeze all kinds of workloads through the existing interface and while it may be easy to change the bindings included with the source code, some users may have private clients they can't share with the community. 

### Bindings and Clients

When a new database is released a *binding* can be created that implements a client communicating with the given data store that will execute YCSB workloads. Details about writing a DB binding can be found on our [GitHub Wiki page](https://github.com/brianfrankcooper/YCSB/wiki/Adding-a-Database). Some development guidelines to follow include:

* Create a new Maven module for your binding. Follow the existing bindings as examples.
* The module *must* include a README.md file with details such as:
  * Database setup with links to documentation so that the YCSB benchmarks will execute properly.
  * Example command line executions (workload selection, etc).
  * Required and optional properties (e.g. connection strings, behavior settings, etc) along with the default values.
  * Versions of the database the binding supports.
* Javadoc the binding and all of the methods. Tell us what it does and how it works.

Because YCSB is a utility to compare multiple data stores, we need each binding to behave similarly by default. That means each data store should enforce the strictest consistency guarantees available and avoid client side buffering or optimizations. This allows users to evaluate different DBs with a common baseline and tough standards.

However you *should* include parameters to tune and improve performance as much as possible to reach those flashy marketing numbers. Just be honest and document what the settings do and what trade-offs are made. (e.g. client side buffering reduces I/O but a crash can lead to data loss).

### Workloads

YCSB began comparing various key/value data stores with simple CRUD operations. However as DBs have become more specialized we've added more workloads for various tasks and would love to have more in the future. Keep the following in mind:

* Make sure more than one publicly available database can handle your workload. It's no fun if only one player is in the game.
* Use the existing DB interface to pass your data around. If you really need another API, discuss with the maintainers to see if there isn't a workaround.
* Provide real-world use cases for the workload, not just theoretical idealizations.

================================================
FILE: LICENSE.txt
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   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.


================================================
FILE: NOTICE.txt
================================================
=========================================================================
NOTICE file for use with, and corresponding to Section 4 of,            
the Apache License, Version 2.0,                                  
in this case for the YCSB project.                     
=========================================================================

   This product includes software developed by
   Yahoo! Inc. (www.yahoo.com)
   Copyright (c) 2010 Yahoo! Inc.  All rights reserved.

   This product includes software developed by
   Google Inc. (www.google.com)
   Copyright (c) 2015 Google Inc.  All rights reserved.


================================================
FILE: README.md
================================================

# ByteIterator

从数据库取数据,我使用了ByteIterator数据接口,其例子和好处如下。

代码示例:


```Java
  @Override
  public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) {
    try {
      byte[] value = db.get(key.getBytes());
      Map<String, ByteIterator> deserialized = deserialize(value);
      result.putAll(deserialized);
    } catch (RocksDBException e) {
      System.out.format("[ERROR] caught the unexpceted exception -- %s\n", e);
      return Status.ERROR;
    }
    return Status.OK;
  }
```
  
Why I use ByteIterator here?

  a.出于性能考虑,主要考虑字符串的成本、拷贝转码问题,流可能是一个图片(blob形式)
  
  b.byte是字节,可以屏蔽utf8、gbk等编码细节。文本从磁盘拿出来本来是二进制,需要通过编码转化为对应的字符。ByteIterator可以屏蔽不同服务器编码不一样的的问题。
  
  
使用Byte来存储数据有什么缺点和优点?

略

使用Iterator有什么缺点和优点?可以屏蔽细节?

略

使用ByteIerator来有什么缺点和有点?  

略



<!--
Copyright (c) 2010 Yahoo! Inc., 2012 - 2016 YCSB contributors.
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.
-->

Leveldb and Rocksdb modules of YCSB
====================================
[![Build Status](https://travis-ci.org/brianfrankcooper/YCSB.png?branch=master)](https://travis-ci.org/brianfrankcooper/YCSB)

Links
-----
http://wiki.github.com/brianfrankcooper/YCSB/  
https://labs.yahoo.com/news/yahoo-cloud-serving-benchmark/
ycsb-users@yahoogroups.com  

Getting Started
---------------

1. Download the [latest release of YCSB](https://github.com/brianfrankcooper/YCSB/releases/latest):

    ```sh
    curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.12.0/ycsb-0.12.0.tar.gz
    tar xfvz ycsb-0.12.0.tar.gz
    cd ycsb-0.12.0
    ```
    
2. Set up a database to benchmark. There is a README file under each binding 
   directory.

3. Run YCSB command. 

    On Linux:
    ```sh
    bin/ycsb.sh load basic -P workloads/workloada
    bin/ycsb.sh run basic -P workloads/workloada
    ```

    On Windows:
    ```bat
    bin/ycsb.bat load basic -P workloads\workloada
    bin/ycsb.bat run basic -P workloads\workloada
    ```

  Running the `ycsb` command without any argument will print the usage. 
   
  See https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload
  for a detailed documentation on how to run a workload.

  See https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties for 
  the list of available workload properties.

Building from source
--------------------

YCSB requires the use of Maven 3; if you use Maven 2, you may see [errors
such as these](https://github.com/brianfrankcooper/YCSB/issues/406).

To build the full distribution, with all database bindings:

    mvn clean package

To build a single database binding:

    mvn -pl com.yahoo.ycsb:mongodb-binding -am clean package


================================================
FILE: Todo.md
================================================
  @Override
  public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) {
    try {
      byte[] value = db.get(key.getBytes());
      Map<String, ByteIterator> deserialized = deserialize(value);
      result.putAll(deserialized);
    } catch (RocksDBException e) {
      System.out.format("[ERROR] caught the unexpceted exception -- %s\n", e);
      return Status.ERROR;
    }
    return Status.OK;
  }
  
  /**
  
  1. Why I use ByteIterator here?
  a.出于性能考虑,主要考虑字符串的成本、拷贝转码问题,流可能是一个图片(blob形式)
  b.byte是字节可以,可以屏蔽utf8、gbk等编码细节。文本从磁盘拿出来本来是二进制,需要通过编码转化为对应的字符。
    ByteIterator可以屏蔽不同服务器编码不一样的的问题。
  
  
  **/


================================================
FILE: accumulo1.6/README.md
================================================
<!--
Copyright (c) 2015 YCSB contributors. 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.
-->

## Quick Start

This section describes how to run YCSB on [Accumulo](https://accumulo.apache.org/). 

### 1. Start Accumulo

See the [Accumulo Documentation](https://accumulo.apache.org/1.6/accumulo_user_manual.html#_installation)
for details on installing and running Accumulo.

Before running the YCSB test you must create the Accumulo table. Again see the 
[Accumulo Documentation](https://accumulo.apache.org/1.6/accumulo_user_manual.html#_basic_administration)
for details. The default table name is `ycsb`.

### 2. Set Up YCSB

Git clone YCSB and compile:

    git clone http://github.com/brianfrankcooper/YCSB.git
    cd YCSB
    mvn -pl com.yahoo.ycsb:accumulo1.6-binding -am clean package

### 3. Create the Accumulo table

By default, YCSB uses a table with the name "usertable". Users must create this table before loading
data into Accumulo. For maximum Accumulo performance, the Accumulo table must be pre-split. A simple
Ruby script, based on the HBase README, can generate adequate split-point. 10's of Tablets per
TabletServer is a good starting point. Unless otherwise specified, the following commands should run
on any version of Accumulo.

    $ echo 'num_splits = 20; puts (1..num_splits).map {|i| "user#{1000+i*(9999-1000)/num_splits}"}' | ruby > /tmp/splits.txt
    $ accumulo shell -u <user> -p <password> -e "createtable usertable"
    $ accumulo shell -u <user> -p <password> -e "addsplits -t usertable -sf /tmp/splits.txt"
    $ accumulo shell -u <user> -p <password> -e "config -t usertable -s table.cache.block.enable=true"

Additionally, there are some other configuration properties which can increase performance. These
can be set on the Accumulo table via the shell after it is created. Setting the table durability
to `flush` relaxes the constraints on data durability during hard power-outages (avoids calls
to fsync). Accumulo defaults table compression to `gzip` which is not particularly fast; `snappy`
is a faster and similarly-efficient option. The mutation queue property controls how many writes
that Accumulo will buffer in memory before performing a flush; this property should be set relative
to the amount of JVM heap the TabletServers are given.

Please note that the `table.durability` and `tserver.total.mutation.queue.max` properties only
exists for >=Accumulo-1.7. There are no concise replacements for these properties in earlier versions.

    accumulo> config -s table.durability=flush
    accumulo> config -s tserver.total.mutation.queue.max=256M
    accumulo> config -t usertable -s table.file.compress.type=snappy

On repeated data loads, the following commands may be helpful to re-set the state of the table quickly.

    accumulo> createtable tmp --copy-splits usertable --copy-config usertable
    accumulo> deletetable --force usertable
    accumulo> renametable tmp usertable
    accumulo> compact --wait -t accumulo.metadata

### 4. Load Data and Run Tests

Load the data:

    ./bin/ycsb load accumulo1.6 -s -P workloads/workloada \
         -p accumulo.zooKeepers=localhost \
         -p accumulo.columnFamily=ycsb \
         -p accumulo.instanceName=ycsb \
         -p accumulo.username=user \
         -p accumulo.password=supersecret \
         > outputLoad.txt

Run the workload test:

    ./bin/ycsb run accumulo1.6 -s -P workloads/workloada  \
         -p accumulo.zooKeepers=localhost \
         -p accumulo.columnFamily=ycsb \
         -p accumulo.instanceName=ycsb \
         -p accumulo.username=user \
         -p accumulo.password=supersecret \
         > outputLoad.txt

## Accumulo Configuration Parameters

- `accumulo.zooKeepers`
  - The Accumulo cluster's [zookeeper servers](https://accumulo.apache.org/1.6/accumulo_user_manual.html#_connecting).
  - Should contain a comma separated list of of hostname or hostname:port values.
  - No default value.

- `accumulo.columnFamily`
  - The name of the column family to use to store the data within the table.
  - No default value.

- `accumulo.instanceName`
  - Name of the Accumulo [instance](https://accumulo.apache.org/1.6/accumulo_user_manual.html#_connecting).
  - No default value.

- `accumulo.username`
  - The username to use when connecting to Accumulo.
  - No default value.
 
- `accumulo.password`
  - The password for the user connecting to Accumulo.
  - No default value.



================================================
FILE: accumulo1.6/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright (c) 2011 YCSB++ project, 2014 - 2016 YCSB contributors.
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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.ycsb</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.14.0-SNAPSHOT</version>
    <relativePath>../binding-parent</relativePath>
  </parent>
  <artifactId>accumulo1.6-binding</artifactId>
  <name>Accumulo 1.6 DB Binding</name>
  <properties>
    <!-- This should match up to the one from your Accumulo version -->
    <hadoop.version>2.2.0</hadoop.version>
    <!-- Tests do not run on jdk9 -->
    <skipJDK9Tests>true</skipJDK9Tests>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.accumulo</groupId>
      <artifactId>accumulo-core</artifactId>
      <version>${accumulo.1.6.version}</version>
    </dependency>
    <!-- Needed for hadoop.io.Text :( -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>${hadoop.version}</version>
      <exclusions>
        <exclusion>
          <groupId>jdk.tools</groupId>
          <artifactId>jdk.tools</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.accumulo</groupId>
      <artifactId>accumulo-minicluster</artifactId>
      <version>${accumulo.1.6.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- needed directly only in test, but transitive
         at runtime for accumulo, hadoop, and thrift. -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.13</version>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>../workloads</directory>
        <targetPath>workloads</targetPath>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
  </build>
</project>


================================================
FILE: accumulo1.6/src/main/conf/accumulo.properties
================================================
# 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


================================================
FILE: accumulo1.6/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java
================================================
/**
 * Copyright (c) 2011 YCSB++ project, 2014-2016 YCSB contributors.
 * 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.
 */

package com.yahoo.ycsb.db.accumulo;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.SortedMap;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.WholeRowIterator;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.util.CleanUp;
import org.apache.hadoop.io.Text;

import com.yahoo.ycsb.ByteArrayByteIterator;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.Status;

/**
 * <a href="https://accumulo.apache.org/">Accumulo</a> binding for YCSB.
 */
public class AccumuloClient extends DB {

  private ZooKeeperInstance inst;
  private Connector connector;
  private Text colFam = new Text("");
  private byte[] colFamBytes = new byte[0];
  private final ConcurrentHashMap<String, BatchWriter> writers = new ConcurrentHashMap<>();

  static {
    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
      public void run() {
        CleanUp.shutdownNow();
      }
    });
  }

  @Override
  public void init() throws DBException {
    colFam = new Text(getProperties().getProperty("accumulo.columnFamily"));
    colFamBytes = colFam.toString().getBytes(UTF_8);

    inst = new ZooKeeperInstance(
        getProperties().getProperty("accumulo.instanceName"),
        getProperties().getProperty("accumulo.zooKeepers"));
    try {
      String principal = getProperties().getProperty("accumulo.username");
      AuthenticationToken token =
          new PasswordToken(getProperties().getProperty("accumulo.password"));
      connector = inst.getConnector(principal, token);
    } catch (AccumuloException | AccumuloSecurityException e) {
      throw new DBException(e);
    }

    if (!(getProperties().getProperty("accumulo.pcFlag", "none").equals("none"))) {
      System.err.println("Sorry, the ZK based producer/consumer implementation has been removed. " +
          "Please see YCSB issue #416 for work on adding a general solution to coordinated work.");
    }
  }

  @Override
  public void cleanup() throws DBException {
    try {
      Iterator<BatchWriter> iterator = writers.values().iterator();
      while (iterator.hasNext()) {
        BatchWriter writer = iterator.next();
        writer.close();
        iterator.remove();
      }
    } catch (MutationsRejectedException e) {
      throw new DBException(e);
    }
  }

  /**
   * Called when the user specifies a table that isn't the same as the existing
   * table. Connect to it and if necessary, close our current connection.
   * 
   * @param table
   *          The table to open.
   */
  public BatchWriter getWriter(String table) throws TableNotFoundException {
    // tl;dr We're paying a cost for the ConcurrentHashMap here to deal with the DB api.
    // We know that YCSB is really only ever going to send us data for one table, so using
    // a concurrent data structure is overkill (especially in such a hot code path).
    // However, the impact seems to be relatively negligible in trivial local tests and it's
    // "more correct" WRT to the API.
    BatchWriter writer = writers.get(table);
    if (null == writer) {
      BatchWriter newWriter = createBatchWriter(table);
      BatchWriter oldWriter = writers.putIfAbsent(table, newWriter);
      // Someone beat us to creating a BatchWriter for this table, use their BatchWriters
      if (null != oldWriter) {
        try {
          // Make sure to clean up our new batchwriter!
          newWriter.close();
        } catch (MutationsRejectedException e) {
          throw new RuntimeException(e);
        }
        writer = oldWriter;
      } else {
        writer = newWriter;
      }
    }
    return writer;
  }

  /**
   * Creates a BatchWriter with the expected configuration.
   *
   * @param table The table to write to
   */
  private BatchWriter createBatchWriter(String table) throws TableNotFoundException {
    BatchWriterConfig bwc = new BatchWriterConfig();
    bwc.setMaxLatency(
        Long.parseLong(getProperties()
            .getProperty("accumulo.batchWriterMaxLatency", "30000")),
        TimeUnit.MILLISECONDS);
    bwc.setMaxMemory(Long.parseLong(
        getProperties().getProperty("accumulo.batchWriterSize", "100000")));
    final String numThreadsValue = getProperties().getProperty("accumulo.batchWriterThreads");
    // Try to saturate the client machine.
    int numThreads = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);
    if (null != numThreadsValue) {
      numThreads = Integer.parseInt(numThreadsValue);
    }
    System.err.println("Using " + numThreads + " threads to write data");
    bwc.setMaxWriteThreads(numThreads);
    return connector.createBatchWriter(table, bwc);
  }

  /**
   * Gets a scanner from Accumulo over one row.
   *
   * @param row the row to scan
   * @param fields the set of columns to scan
   * @return an Accumulo {@link Scanner} bound to the given row and columns
   */
  private Scanner getRow(String table, Text row, Set<String> fields) throws TableNotFoundException {
    Scanner scanner = connector.createScanner(table, Authorizations.EMPTY);
    scanner.setRange(new Range(row));
    if (fields != null) {
      for (String field : fields) {
        scanner.fetchColumn(colFam, new Text(field));
      }
    }
    return scanner;
  }

  @Override
  public Status read(String table, String key, Set<String> fields,
                     Map<String, ByteIterator> result) {

    Scanner scanner = null;
    try {
      scanner = getRow(table, new Text(key), null);
      // Pick out the results we care about.
      final Text cq = new Text();
      for (Entry<Key, Value> entry : scanner) {
        entry.getKey().getColumnQualifier(cq);
        Value v = entry.getValue();
        byte[] buf = v.get();
        result.put(cq.toString(),
            new ByteArrayByteIterator(buf));
      }
    } catch (Exception e) {
      System.err.println("Error trying to reading Accumulo table " + table + " " + key);
      e.printStackTrace();
      return Status.ERROR;
    } finally {
      if (null != scanner) {
        scanner.close();
      }
    }
    return Status.OK;

  }

  @Override
  public Status scan(String table, String startkey, int recordcount,
      Set<String> fields, Vector<HashMap<String, ByteIterator>> result) {
    // Just make the end 'infinity' and only read as much as we need.
    Scanner scanner = null;
    try {
      scanner = connector.createScanner(table, Authorizations.EMPTY);
      scanner.setRange(new Range(new Text(startkey), null));

      // Have Accumulo send us complete rows, serialized in a single Key-Value pair
      IteratorSetting cfg = new IteratorSetting(100, WholeRowIterator.class);
      scanner.addScanIterator(cfg);

      // If no fields are provided, we assume one column/row.
      if (fields != null) {
        // And add each of them as fields we want.
        for (String field : fields) {
          scanner.fetchColumn(colFam, new Text(field));
        }
      }

      int count = 0;
      for (Entry<Key, Value> entry : scanner) {
        // Deserialize the row
        SortedMap<Key, Value> row = WholeRowIterator.decodeRow(entry.getKey(), entry.getValue());
        HashMap<String, ByteIterator> rowData;
        if (null != fields) {
          rowData = new HashMap<>(fields.size());
        } else {
          rowData = new HashMap<>();
        }
        result.add(rowData);
        // Parse the data in the row, avoid unnecessary Text object creation
        final Text cq = new Text();
        for (Entry<Key, Value> rowEntry : row.entrySet()) {
          rowEntry.getKey().getColumnQualifier(cq);
          rowData.put(cq.toString(), new ByteArrayByteIterator(rowEntry.getValue().get()));
        }
        if (count++ == recordcount) { // Done reading the last row.
          break;
        }
      }
    } catch (TableNotFoundException e) {
      System.err.println("Error trying to connect to Accumulo table.");
      e.printStackTrace();
      return Status.ERROR;
    } catch (IOException e) {
      System.err.println("Error deserializing data from Accumulo.");
      e.printStackTrace();
      return Status.ERROR;
    } finally {
      if (null != scanner) {
        scanner.close();
      }
    }

    return Status.OK;
  }

  @Override
  public Status update(String table, String key,
                       Map<String, ByteIterator> values) {
    BatchWriter bw = null;
    try {
      bw = getWriter(table);
    } catch (TableNotFoundException e) {
      System.err.println("Error opening batch writer to Accumulo table " + table);
      e.printStackTrace();
      return Status.ERROR;
    }

    Mutation mutInsert = new Mutation(key.getBytes(UTF_8));
    for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
      mutInsert.put(colFamBytes, entry.getKey().getBytes(UTF_8), entry.getValue().toArray());
    }

    try {
      bw.addMutation(mutInsert);
    } catch (MutationsRejectedException e) {
      System.err.println("Error performing update.");
      e.printStackTrace();
      return Status.ERROR;
    }

    return Status.BATCHED_OK;
  }

  @Override
  public Status insert(String t, String key,
                       Map<String, ByteIterator> values) {
    return update(t, key, values);
  }

  @Override
  public Status delete(String table, String key) {
    BatchWriter bw;
    try {
      bw = getWriter(table);
    } catch (TableNotFoundException e) {
      System.err.println("Error trying to connect to Accumulo table.");
      e.printStackTrace();
      return Status.ERROR;
    }

    try {
      deleteRow(table, new Text(key), bw);
    } catch (TableNotFoundException | MutationsRejectedException e) {
      System.err.println("Error performing delete.");
      e.printStackTrace();
      return Status.ERROR;
    } catch (RuntimeException e) {
      System.err.println("Error performing delete.");
      e.printStackTrace();
      return Status.ERROR;
    }

    return Status.OK;
  }

  // These functions are adapted from RowOperations.java:
  private void deleteRow(String table, Text row, BatchWriter bw) throws MutationsRejectedException,
          TableNotFoundException {
    // TODO Use a batchDeleter instead
    deleteRow(getRow(table, row, null), bw);
  }

  /**
   * Deletes a row, given a Scanner of JUST that row.
   */
  private void deleteRow(Scanner scanner, BatchWriter bw) throws MutationsRejectedException {
    Mutation deleter = null;
    // iterate through the keys
    final Text row = new Text();
    final Text cf = new Text();
    final Text cq = new Text();
    for (Entry<Key, Value> entry : scanner) {
      // create a mutation for the row
      if (deleter == null) {
        entry.getKey().getRow(row);
        deleter = new Mutation(row);
      }
      entry.getKey().getColumnFamily(cf);
      entry.getKey().getColumnQualifier(cq);
      // the remove function adds the key with the delete flag set to true
      deleter.putDelete(cf, cq);
    }

    bw.addMutation(deleter);
  }
}


================================================
FILE: accumulo1.6/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java
================================================
/**
 * Copyright (c) 2015 YCSB contributors. 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.
 */

/**
 * YCSB binding for <a href="https://accumulo.apache.org/">Apache Accumulo</a>.
 */
package com.yahoo.ycsb.db.accumulo;



================================================
FILE: accumulo1.6/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java
================================================
/*
 * Copyright (c) 2016 YCSB contributors.
 * 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.
 */

package com.yahoo.ycsb.db.accumulo;


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

import java.util.Map.Entry;
import java.util.Properties;

import com.yahoo.ycsb.Workload;
import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.measurements.Measurements;
import com.yahoo.ycsb.workloads.CoreWorkload;

import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.TablePermission;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Use an Accumulo MiniCluster to test out basic workload operations with
 * the Accumulo binding.
 */
public class AccumuloTest {
  private static final Logger LOG = LoggerFactory.getLogger(AccumuloTest.class);
  private static final int INSERT_COUNT = 2000;
  private static final int TRANSACTION_COUNT = 2000;

  @ClassRule
  public static TemporaryFolder workingDir = new TemporaryFolder();
  @Rule
  public TestName test = new TestName();

  private static MiniAccumuloCluster cluster;
  private static Properties properties;
  private Workload workload;
  private DB client;
  private Properties workloadProps;

  private static boolean isWindows() {
    final String os = System.getProperty("os.name");
    return os.startsWith("Windows");
  }

  @BeforeClass
  public static void setup() throws Exception {
    // Minicluster setup fails on Windows with an UnsatisfiedLinkError.
    // Skip if windows.
    assumeTrue(!isWindows());
    cluster = new MiniAccumuloCluster(workingDir.newFolder("accumulo").getAbsoluteFile(), "protectyaneck");
    LOG.debug("starting minicluster");
    cluster.start();
    LOG.debug("creating connection for admin operations.");
    // set up the table and user
    final Connector admin = cluster.getConnector("root", "protectyaneck");
    admin.tableOperations().create(CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
    admin.securityOperations().createLocalUser("ycsb", new PasswordToken("protectyaneck"));
    admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.READ);
    admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.WRITE);

    // set properties the binding will read
    properties = new Properties();
    properties.setProperty("accumulo.zooKeepers", cluster.getZooKeepers());
    properties.setProperty("accumulo.instanceName", cluster.getInstanceName());
    properties.setProperty("accumulo.columnFamily", "family");
    properties.setProperty("accumulo.username", "ycsb");
    properties.setProperty("accumulo.password", "protectyaneck");
    // cut down the batch writer timeout so that writes will push through.
    properties.setProperty("accumulo.batchWriterMaxLatency", "4");
    // set these explicitly to the defaults at the time we're compiled, since they'll be inlined in our class.
    properties.setProperty(CoreWorkload.TABLENAME_PROPERTY, CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
    properties.setProperty(CoreWorkload.FIELD_COUNT_PROPERTY, CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT);
    properties.setProperty(CoreWorkload.INSERT_ORDER_PROPERTY, "ordered");
  }

  @AfterClass
  public static void clusterCleanup() throws Exception {
    if (cluster != null) {
      LOG.debug("shutting down minicluster");
      cluster.stop();
      cluster = null;
    }
  }

  @Before
  public void client() throws Exception {

    LOG.debug("Loading workload properties for {}", test.getMethodName());
    workloadProps = new Properties();
    workloadProps.load(getClass().getResourceAsStream("/workloads/" + test.getMethodName()));

    for (String prop : properties.stringPropertyNames()) {
      workloadProps.setProperty(prop, properties.getProperty(prop));
    }

    // TODO we need a better test rig for 'run this ycsb workload'
    LOG.debug("initializing measurements and workload");
    Measurements.setProperties(workloadProps);
    workload = new CoreWorkload();
    workload.init(workloadProps);

    LOG.debug("initializing client");
    client = new AccumuloClient();
    client.setProperties(workloadProps);
    client.init();
  }

  @After
  public void cleanup() throws Exception {
    if (client != null) {
      LOG.debug("cleaning up client");
      client.cleanup();
      client = null;
    }
    if (workload != null) {
      LOG.debug("cleaning up workload");
      workload.cleanup();
    }
  }

  @After
  public void truncateTable() throws Exception {
    if (cluster != null) {
      LOG.debug("truncating table {}", CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
      final Connector admin = cluster.getConnector("root", "protectyaneck");
      admin.tableOperations().deleteRows(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, null, null);
    }
  }

  @Test
  public void workloada() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadb() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadc() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadd() throws Exception {
    runWorkload();
  }

  @Test
  public void workloade() throws Exception {
    runWorkload();
  }

  /**
   * go through a workload cycle.
   * <ol>
   *   <li>initialize thread-specific state
   *   <li>load the workload dataset
   *   <li>run workload transactions
   * </ol>
   */
  private void runWorkload() throws Exception {
    final Object state = workload.initThread(workloadProps,0,0);
    LOG.debug("load");
    for (int i = 0; i < INSERT_COUNT; i++) {
      assertTrue("insert failed.", workload.doInsert(client, state));
    }
    // Ensure we wait long enough for the batch writer to flush
    // TODO accumulo client should be flushing per insert by default.
    Thread.sleep(2000);
    LOG.debug("verify number of cells");
    final Scanner scanner = cluster.getConnector("root", "protectyaneck").createScanner(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, Authorizations.EMPTY);
    int count = 0;
    for (Entry<Key, Value> entry : scanner) {
      count++;
    }
    assertEquals("Didn't get enough total cells.", (Integer.valueOf(CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT) * INSERT_COUNT), count);
    LOG.debug("run");
    for (int i = 0; i < TRANSACTION_COUNT; i++) {
      assertTrue("transaction failed.", workload.doTransaction(client, state));
    }
  }
}


================================================
FILE: accumulo1.6/src/test/resources/log4j.properties
================================================
#
# Copyright (c) 2015 YCSB contributors. 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.
#

# Root logger option
log4j.rootLogger=INFO, stderr

log4j.appender.stderr=org.apache.log4j.ConsoleAppender
log4j.appender.stderr.target=System.err
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n

# Suppress messages from ZooKeeper
log4j.logger.com.yahoo.ycsb.db.accumulo=INFO
log4j.logger.org.apache.zookeeper=ERROR
log4j.logger.org.apache.accumulo=WARN


================================================
FILE: accumulo1.7/README.md
================================================
<!--
Copyright (c) 2015 YCSB contributors. 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.
-->

## Quick Start

This section describes how to run YCSB on [Accumulo](https://accumulo.apache.org/). 

### 1. Start Accumulo

See the [Accumulo Documentation](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_installation)
for details on installing and running Accumulo.

Before running the YCSB test you must create the Accumulo table. Again see the 
[Accumulo Documentation](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_basic_administration)
for details. The default table name is `ycsb`.

### 2. Set Up YCSB

Git clone YCSB and compile:

    git clone http://github.com/brianfrankcooper/YCSB.git
    cd YCSB
    mvn -pl com.yahoo.ycsb:accumulo1.7-binding -am clean package

### 3. Create the Accumulo table

By default, YCSB uses a table with the name "usertable". Users must create this table before loading
data into Accumulo. For maximum Accumulo performance, the Accumulo table must be pre-split. A simple
Ruby script, based on the HBase README, can generate adequate split-point. 10's of Tablets per
TabletServer is a good starting point. Unless otherwise specified, the following commands should run
on any version of Accumulo.

    $ echo 'num_splits = 20; puts (1..num_splits).map {|i| "user#{1000+i*(9999-1000)/num_splits}"}' | ruby > /tmp/splits.txt
    $ accumulo shell -u <user> -p <password> -e "createtable usertable"
    $ accumulo shell -u <user> -p <password> -e "addsplits -t usertable -sf /tmp/splits.txt"
    $ accumulo shell -u <user> -p <password> -e "config -t usertable -s table.cache.block.enable=true"

Additionally, there are some other configuration properties which can increase performance. These
can be set on the Accumulo table via the shell after it is created. Setting the table durability
to `flush` relaxes the constraints on data durability during hard power-outages (avoids calls
to fsync). Accumulo defaults table compression to `gzip` which is not particularly fast; `snappy`
is a faster and similarly-efficient option. The mutation queue property controls how many writes
that Accumulo will buffer in memory before performing a flush; this property should be set relative
to the amount of JVM heap the TabletServers are given.

Please note that the `table.durability` and `tserver.total.mutation.queue.max` properties only
exists for >=Accumulo-1.7. There are no concise replacements for these properties in earlier versions.

    accumulo> config -s table.durability=flush
    accumulo> config -s tserver.total.mutation.queue.max=256M
    accumulo> config -t usertable -s table.file.compress.type=snappy

On repeated data loads, the following commands may be helpful to re-set the state of the table quickly.

    accumulo> createtable tmp --copy-splits usertable --copy-config usertable
    accumulo> deletetable --force usertable
    accumulo> renametable tmp usertable
    accumulo> compact --wait -t accumulo.metadata

### 4. Load Data and Run Tests

Load the data:

    ./bin/ycsb load accumulo1.7 -s -P workloads/workloada \
         -p accumulo.zooKeepers=localhost \
         -p accumulo.columnFamily=ycsb \
         -p accumulo.instanceName=ycsb \
         -p accumulo.username=user \
         -p accumulo.password=supersecret \
         > outputLoad.txt

Run the workload test:

    ./bin/ycsb run accumulo1.7 -s -P workloads/workloada  \
         -p accumulo.zooKeepers=localhost \
         -p accumulo.columnFamily=ycsb \
         -p accumulo.instanceName=ycsb \
         -p accumulo.username=user \
         -p accumulo.password=supersecret \
         > outputLoad.txt

## Accumulo Configuration Parameters

- `accumulo.zooKeepers`
  - The Accumulo cluster's [zookeeper servers](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_connecting).
  - Should contain a comma separated list of of hostname or hostname:port values.
  - No default value.

- `accumulo.columnFamily`
  - The name of the column family to use to store the data within the table.
  - No default value.

- `accumulo.instanceName`
  - Name of the Accumulo [instance](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_connecting).
  - No default value.

- `accumulo.username`
  - The username to use when connecting to Accumulo.
  - No default value.
 
- `accumulo.password`
  - The password for the user connecting to Accumulo.
  - No default value.



================================================
FILE: accumulo1.7/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright (c) 2011 YCSB++ project, 2014 - 2016 YCSB contributors.
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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.ycsb</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.14.0-SNAPSHOT</version>
    <relativePath>../binding-parent</relativePath>
  </parent>
  <artifactId>accumulo1.7-binding</artifactId>
  <name>Accumulo 1.7 DB Binding</name>
  <properties>
    <!-- This should match up to the one from your Accumulo version -->
    <hadoop.version>2.2.0</hadoop.version>
    <!-- Tests do not run on jdk9 -->
    <skipJDK9Tests>true</skipJDK9Tests>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.accumulo</groupId>
      <artifactId>accumulo-core</artifactId>
      <version>${accumulo.1.7.version}</version>
    </dependency>
    <!-- Needed for hadoop.io.Text :( -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>${hadoop.version}</version>
      <exclusions>
        <exclusion>
          <groupId>jdk.tools</groupId>
          <artifactId>jdk.tools</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.accumulo</groupId>
      <artifactId>accumulo-minicluster</artifactId>
      <version>${accumulo.1.7.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- needed directly only in test, but transitive
         at runtime for accumulo, hadoop, and thrift. -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.13</version>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>../workloads</directory>
        <targetPath>workloads</targetPath>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
  </build>
</project>


================================================
FILE: accumulo1.7/src/main/conf/accumulo.properties
================================================
# 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


================================================
FILE: accumulo1.7/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java
================================================
/**
 * Copyright (c) 2011 YCSB++ project, 2014-2016 YCSB contributors.
 * 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.
 */

package com.yahoo.ycsb.db.accumulo;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.SortedMap;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.ClientConfiguration;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.WholeRowIterator;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.util.CleanUp;
import org.apache.hadoop.io.Text;

import com.yahoo.ycsb.ByteArrayByteIterator;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.Status;

/**
 * <a href="https://accumulo.apache.org/">Accumulo</a> binding for YCSB.
 */
public class AccumuloClient extends DB {

  private ZooKeeperInstance inst;
  private Connector connector;
  private Text colFam = new Text("");
  private byte[] colFamBytes = new byte[0];
  private final ConcurrentHashMap<String, BatchWriter> writers = new ConcurrentHashMap<>();

  static {
    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
      public void run() {
        CleanUp.shutdownNow();
      }
    });
  }

  @Override
  public void init() throws DBException {
    colFam = new Text(getProperties().getProperty("accumulo.columnFamily"));
    colFamBytes = colFam.toString().getBytes(UTF_8);

    inst = new ZooKeeperInstance(new ClientConfiguration()
        .withInstance(getProperties().getProperty("accumulo.instanceName"))
        .withZkHosts(getProperties().getProperty("accumulo.zooKeepers")));
    try {
      String principal = getProperties().getProperty("accumulo.username");
      AuthenticationToken token =
          new PasswordToken(getProperties().getProperty("accumulo.password"));
      connector = inst.getConnector(principal, token);
    } catch (AccumuloException | AccumuloSecurityException e) {
      throw new DBException(e);
    }

    if (!(getProperties().getProperty("accumulo.pcFlag", "none").equals("none"))) {
      System.err.println("Sorry, the ZK based producer/consumer implementation has been removed. " +
          "Please see YCSB issue #416 for work on adding a general solution to coordinated work.");
    }
  }

  @Override
  public void cleanup() throws DBException {
    try {
      Iterator<BatchWriter> iterator = writers.values().iterator();
      while (iterator.hasNext()) {
        BatchWriter writer = iterator.next();
        writer.close();
        iterator.remove();
      }
    } catch (MutationsRejectedException e) {
      throw new DBException(e);
    }
  }

  /**
   * Called when the user specifies a table that isn't the same as the existing
   * table. Connect to it and if necessary, close our current connection.
   * 
   * @param table
   *          The table to open.
   */
  public BatchWriter getWriter(String table) throws TableNotFoundException {
    // tl;dr We're paying a cost for the ConcurrentHashMap here to deal with the DB api.
    // We know that YCSB is really only ever going to send us data for one table, so using
    // a concurrent data structure is overkill (especially in such a hot code path).
    // However, the impact seems to be relatively negligible in trivial local tests and it's
    // "more correct" WRT to the API.
    BatchWriter writer = writers.get(table);
    if (null == writer) {
      BatchWriter newWriter = createBatchWriter(table);
      BatchWriter oldWriter = writers.putIfAbsent(table, newWriter);
      // Someone beat us to creating a BatchWriter for this table, use their BatchWriters
      if (null != oldWriter) {
        try {
          // Make sure to clean up our new batchwriter!
          newWriter.close();
        } catch (MutationsRejectedException e) {
          throw new RuntimeException(e);
        }
        writer = oldWriter;
      } else {
        writer = newWriter;
      }
    }
    return writer;
  }

  /**
   * Creates a BatchWriter with the expected configuration.
   *
   * @param table The table to write to
   */
  private BatchWriter createBatchWriter(String table) throws TableNotFoundException {
    BatchWriterConfig bwc = new BatchWriterConfig();
    bwc.setMaxLatency(
        Long.parseLong(getProperties()
            .getProperty("accumulo.batchWriterMaxLatency", "30000")),
        TimeUnit.MILLISECONDS);
    bwc.setMaxMemory(Long.parseLong(
        getProperties().getProperty("accumulo.batchWriterSize", "100000")));
    final String numThreadsValue = getProperties().getProperty("accumulo.batchWriterThreads");
    // Try to saturate the client machine.
    int numThreads = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);
    if (null != numThreadsValue) {
      numThreads = Integer.parseInt(numThreadsValue);
    }
    System.err.println("Using " + numThreads + " threads to write data");
    bwc.setMaxWriteThreads(numThreads);
    return connector.createBatchWriter(table, bwc);
  }

  /**
   * Gets a scanner from Accumulo over one row.
   *
   * @param row the row to scan
   * @param fields the set of columns to scan
   * @return an Accumulo {@link Scanner} bound to the given row and columns
   */
  private Scanner getRow(String table, Text row, Set<String> fields) throws TableNotFoundException {
    Scanner scanner = connector.createScanner(table, Authorizations.EMPTY);
    scanner.setRange(new Range(row));
    if (fields != null) {
      for (String field : fields) {
        scanner.fetchColumn(colFam, new Text(field));
      }
    }
    return scanner;
  }

  @Override
  public Status read(String table, String key, Set<String> fields,
                     Map<String, ByteIterator> result) {

    Scanner scanner = null;
    try {
      scanner = getRow(table, new Text(key), null);
      // Pick out the results we care about.
      final Text cq = new Text();
      for (Entry<Key, Value> entry : scanner) {
        entry.getKey().getColumnQualifier(cq);
        Value v = entry.getValue();
        byte[] buf = v.get();
        result.put(cq.toString(),
            new ByteArrayByteIterator(buf));
      }
    } catch (Exception e) {
      System.err.println("Error trying to reading Accumulo table " + table + " " + key);
      e.printStackTrace();
      return Status.ERROR;
    } finally {
      if (null != scanner) {
        scanner.close();
      }
    }
    return Status.OK;

  }

  @Override
  public Status scan(String table, String startkey, int recordcount,
      Set<String> fields, Vector<HashMap<String, ByteIterator>> result) {
    // Just make the end 'infinity' and only read as much as we need.
    Scanner scanner = null;
    try {
      scanner = connector.createScanner(table, Authorizations.EMPTY);
      scanner.setRange(new Range(new Text(startkey), null));

      // Have Accumulo send us complete rows, serialized in a single Key-Value pair
      IteratorSetting cfg = new IteratorSetting(100, WholeRowIterator.class);
      scanner.addScanIterator(cfg);

      // If no fields are provided, we assume one column/row.
      if (fields != null) {
        // And add each of them as fields we want.
        for (String field : fields) {
          scanner.fetchColumn(colFam, new Text(field));
        }
      }

      int count = 0;
      for (Entry<Key, Value> entry : scanner) {
        // Deserialize the row
        SortedMap<Key, Value> row = WholeRowIterator.decodeRow(entry.getKey(), entry.getValue());
        HashMap<String, ByteIterator> rowData;
        if (null != fields) {
          rowData = new HashMap<>(fields.size());
        } else {
          rowData = new HashMap<>();
        }
        result.add(rowData);
        // Parse the data in the row, avoid unnecessary Text object creation
        final Text cq = new Text();
        for (Entry<Key, Value> rowEntry : row.entrySet()) {
          rowEntry.getKey().getColumnQualifier(cq);
          rowData.put(cq.toString(), new ByteArrayByteIterator(rowEntry.getValue().get()));
        }
        if (count++ == recordcount) { // Done reading the last row.
          break;
        }
      }
    } catch (TableNotFoundException e) {
      System.err.println("Error trying to connect to Accumulo table.");
      e.printStackTrace();
      return Status.ERROR;
    } catch (IOException e) {
      System.err.println("Error deserializing data from Accumulo.");
      e.printStackTrace();
      return Status.ERROR;
    } finally {
      if (null != scanner) {
        scanner.close();
      }
    }

    return Status.OK;
  }

  @Override
  public Status update(String table, String key,
                       Map<String, ByteIterator> values) {
    BatchWriter bw = null;
    try {
      bw = getWriter(table);
    } catch (TableNotFoundException e) {
      System.err.println("Error opening batch writer to Accumulo table " + table);
      e.printStackTrace();
      return Status.ERROR;
    }

    Mutation mutInsert = new Mutation(key.getBytes(UTF_8));
    for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
      mutInsert.put(colFamBytes, entry.getKey().getBytes(UTF_8), entry.getValue().toArray());
    }

    try {
      bw.addMutation(mutInsert);
    } catch (MutationsRejectedException e) {
      System.err.println("Error performing update.");
      e.printStackTrace();
      return Status.ERROR;
    }

    return Status.BATCHED_OK;
  }

  @Override
  public Status insert(String t, String key,
                       Map<String, ByteIterator> values) {
    return update(t, key, values);
  }

  @Override
  public Status delete(String table, String key) {
    BatchWriter bw;
    try {
      bw = getWriter(table);
    } catch (TableNotFoundException e) {
      System.err.println("Error trying to connect to Accumulo table.");
      e.printStackTrace();
      return Status.ERROR;
    }

    try {
      deleteRow(table, new Text(key), bw);
    } catch (TableNotFoundException | MutationsRejectedException e) {
      System.err.println("Error performing delete.");
      e.printStackTrace();
      return Status.ERROR;
    } catch (RuntimeException e) {
      System.err.println("Error performing delete.");
      e.printStackTrace();
      return Status.ERROR;
    }

    return Status.OK;
  }

  // These functions are adapted from RowOperations.java:
  private void deleteRow(String table, Text row, BatchWriter bw) throws MutationsRejectedException,
          TableNotFoundException {
    // TODO Use a batchDeleter instead
    deleteRow(getRow(table, row, null), bw);
  }

  /**
   * Deletes a row, given a Scanner of JUST that row.
   */
  private void deleteRow(Scanner scanner, BatchWriter bw) throws MutationsRejectedException {
    Mutation deleter = null;
    // iterate through the keys
    final Text row = new Text();
    final Text cf = new Text();
    final Text cq = new Text();
    for (Entry<Key, Value> entry : scanner) {
      // create a mutation for the row
      if (deleter == null) {
        entry.getKey().getRow(row);
        deleter = new Mutation(row);
      }
      entry.getKey().getColumnFamily(cf);
      entry.getKey().getColumnQualifier(cq);
      // the remove function adds the key with the delete flag set to true
      deleter.putDelete(cf, cq);
    }

    bw.addMutation(deleter);
  }
}


================================================
FILE: accumulo1.7/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java
================================================
/**
 * Copyright (c) 2015 YCSB contributors. 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.
 */

/**
 * YCSB binding for <a href="https://accumulo.apache.org/">Apache Accumulo</a>.
 */
package com.yahoo.ycsb.db.accumulo;



================================================
FILE: accumulo1.7/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java
================================================
/*
 * Copyright (c) 2016 YCSB contributors.
 * 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.
 */

package com.yahoo.ycsb.db.accumulo;


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

import java.util.Map.Entry;
import java.util.Properties;

import com.yahoo.ycsb.Workload;
import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.measurements.Measurements;
import com.yahoo.ycsb.workloads.CoreWorkload;

import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.TablePermission;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Use an Accumulo MiniCluster to test out basic workload operations with
 * the Accumulo binding.
 */
public class AccumuloTest {
  private static final Logger LOG = LoggerFactory.getLogger(AccumuloTest.class);
  private static final int INSERT_COUNT = 2000;
  private static final int TRANSACTION_COUNT = 2000;

  @ClassRule
  public static TemporaryFolder workingDir = new TemporaryFolder();
  @Rule
  public TestName test = new TestName();

  private static MiniAccumuloCluster cluster;
  private static Properties properties;
  private Workload workload;
  private DB client;
  private Properties workloadProps;

  private static boolean isWindows() {
    final String os = System.getProperty("os.name");
    return os.startsWith("Windows");
  }

  @BeforeClass
  public static void setup() throws Exception {
    // Minicluster setup fails on Windows with an UnsatisfiedLinkError.
    // Skip if windows.
    assumeTrue(!isWindows());
    cluster = new MiniAccumuloCluster(workingDir.newFolder("accumulo").getAbsoluteFile(), "protectyaneck");
    LOG.debug("starting minicluster");
    cluster.start();
    LOG.debug("creating connection for admin operations.");
    // set up the table and user
    final Connector admin = cluster.getConnector("root", "protectyaneck");
    admin.tableOperations().create(CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
    admin.securityOperations().createLocalUser("ycsb", new PasswordToken("protectyaneck"));
    admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.READ);
    admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.WRITE);

    // set properties the binding will read
    properties = new Properties();
    properties.setProperty("accumulo.zooKeepers", cluster.getZooKeepers());
    properties.setProperty("accumulo.instanceName", cluster.getInstanceName());
    properties.setProperty("accumulo.columnFamily", "family");
    properties.setProperty("accumulo.username", "ycsb");
    properties.setProperty("accumulo.password", "protectyaneck");
    // cut down the batch writer timeout so that writes will push through.
    properties.setProperty("accumulo.batchWriterMaxLatency", "4");
    // set these explicitly to the defaults at the time we're compiled, since they'll be inlined in our class.
    properties.setProperty(CoreWorkload.TABLENAME_PROPERTY, CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
    properties.setProperty(CoreWorkload.FIELD_COUNT_PROPERTY, CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT);
    properties.setProperty(CoreWorkload.INSERT_ORDER_PROPERTY, "ordered");
  }

  @AfterClass
  public static void clusterCleanup() throws Exception {
    if (cluster != null) {
      LOG.debug("shutting down minicluster");
      cluster.stop();
      cluster = null;
    }
  }

  @Before
  public void client() throws Exception {

    LOG.debug("Loading workload properties for {}", test.getMethodName());
    workloadProps = new Properties();
    workloadProps.load(getClass().getResourceAsStream("/workloads/" + test.getMethodName()));

    for (String prop : properties.stringPropertyNames()) {
      workloadProps.setProperty(prop, properties.getProperty(prop));
    }

    // TODO we need a better test rig for 'run this ycsb workload'
    LOG.debug("initializing measurements and workload");
    Measurements.setProperties(workloadProps);
    workload = new CoreWorkload();
    workload.init(workloadProps);

    LOG.debug("initializing client");
    client = new AccumuloClient();
    client.setProperties(workloadProps);
    client.init();
  }

  @After
  public void cleanup() throws Exception {
    if (client != null) {
      LOG.debug("cleaning up client");
      client.cleanup();
      client = null;
    }
    if (workload != null) {
      LOG.debug("cleaning up workload");
      workload.cleanup();
    }
  }

  @After
  public void truncateTable() throws Exception {
    if (cluster != null) {
      LOG.debug("truncating table {}", CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
      final Connector admin = cluster.getConnector("root", "protectyaneck");
      admin.tableOperations().deleteRows(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, null, null);
    }
  }

  @Test
  public void workloada() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadb() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadc() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadd() throws Exception {
    runWorkload();
  }

  @Test
  public void workloade() throws Exception {
    runWorkload();
  }

  /**
   * go through a workload cycle.
   * <ol>
   *   <li>initialize thread-specific state
   *   <li>load the workload dataset
   *   <li>run workload transactions
   * </ol>
   */
  private void runWorkload() throws Exception {
    final Object state = workload.initThread(workloadProps,0,0);
    LOG.debug("load");
    for (int i = 0; i < INSERT_COUNT; i++) {
      assertTrue("insert failed.", workload.doInsert(client, state));
    }
    // Ensure we wait long enough for the batch writer to flush
    // TODO accumulo client should be flushing per insert by default.
    Thread.sleep(2000);
    LOG.debug("verify number of cells");
    final Scanner scanner = cluster.getConnector("root", "protectyaneck").createScanner(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, Authorizations.EMPTY);
    int count = 0;
    for (Entry<Key, Value> entry : scanner) {
      count++;
    }
    assertEquals("Didn't get enough total cells.", (Integer.valueOf(CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT) * INSERT_COUNT), count);
    LOG.debug("run");
    for (int i = 0; i < TRANSACTION_COUNT; i++) {
      assertTrue("transaction failed.", workload.doTransaction(client, state));
    }
  }
}


================================================
FILE: accumulo1.7/src/test/resources/log4j.properties
================================================
#
# Copyright (c) 2015 YCSB contributors. 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.
#

# Root logger option
log4j.rootLogger=INFO, stderr

log4j.appender.stderr=org.apache.log4j.ConsoleAppender
log4j.appender.stderr.target=System.err
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n

# Suppress messages from ZooKeeper
log4j.logger.com.yahoo.ycsb.db.accumulo=DEBUG
log4j.logger.org.apache.zookeeper=ERROR
log4j.logger.org.apache.accumulo=WARN


================================================
FILE: accumulo1.8/README.md
================================================
<!--
Copyright (c) 2015 YCSB contributors. 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.
-->

## Quick Start

This section describes how to run YCSB on [Accumulo](https://accumulo.apache.org/). 

### 1. Start Accumulo

See the [Accumulo Documentation](https://accumulo.apache.org/1.8/accumulo_user_manual.html#_installation)
for details on installing and running Accumulo.

Before running the YCSB test you must create the Accumulo table. Again see the 
[Accumulo Documentation](https://accumulo.apache.org/1.8/accumulo_user_manual.html#_basic_administration)
for details. The default table name is `ycsb`.

### 2. Set Up YCSB

Git clone YCSB and compile:

    git clone http://github.com/brianfrankcooper/YCSB.git
    cd YCSB
    mvn -pl com.yahoo.ycsb:accumulo1.8-binding -am clean package

### 3. Create the Accumulo table

By default, YCSB uses a table with the name "usertable". Users must create this table before loading
data into Accumulo. For maximum Accumulo performance, the Accumulo table must be pre-split. A simple
Ruby script, based on the HBase README, can generate adequate split-point. 10's of Tablets per
TabletServer is a good starting point. Unless otherwise specified, the following commands should run
on any version of Accumulo.

    $ echo 'num_splits = 20; puts (1..num_splits).map {|i| "user#{1000+i*(9999-1000)/num_splits}"}' | ruby > /tmp/splits.txt
    $ accumulo shell -u <user> -p <password> -e "createtable usertable"
    $ accumulo shell -u <user> -p <password> -e "addsplits -t usertable -sf /tmp/splits.txt"
    $ accumulo shell -u <user> -p <password> -e "config -t usertable -s table.cache.block.enable=true"

Additionally, there are some other configuration properties which can increase performance. These
can be set on the Accumulo table via the shell after it is created. Setting the table durability
to `flush` relaxes the constraints on data durability during hard power-outages (avoids calls
to fsync). Accumulo defaults table compression to `gzip` which is not particularly fast; `snappy`
is a faster and similarly-efficient option. The mutation queue property controls how many writes
that Accumulo will buffer in memory before performing a flush; this property should be set relative
to the amount of JVM heap the TabletServers are given.

Please note that the `table.durability` and `tserver.total.mutation.queue.max` properties only
exists for >=Accumulo-1.7. There are no concise replacements for these properties in earlier versions.

    accumulo> config -s table.durability=flush
    accumulo> config -s tserver.total.mutation.queue.max=256M
    accumulo> config -t usertable -s table.file.compress.type=snappy

On repeated data loads, the following commands may be helpful to re-set the state of the table quickly.

    accumulo> createtable tmp --copy-splits usertable --copy-config usertable
    accumulo> deletetable --force usertable
    accumulo> renametable tmp usertable
    accumulo> compact --wait -t accumulo.metadata

### 4. Load Data and Run Tests

Load the data:

    ./bin/ycsb load accumulo1.8 -s -P workloads/workloada \
         -p accumulo.zooKeepers=localhost \
         -p accumulo.columnFamily=ycsb \
         -p accumulo.instanceName=ycsb \
         -p accumulo.username=user \
         -p accumulo.password=supersecret \
         > outputLoad.txt

Run the workload test:

    ./bin/ycsb run accumulo1.8 -s -P workloads/workloada  \
         -p accumulo.zooKeepers=localhost \
         -p accumulo.columnFamily=ycsb \
         -p accumulo.instanceName=ycsb \
         -p accumulo.username=user \
         -p accumulo.password=supersecret \
         > outputLoad.txt

## Accumulo Configuration Parameters

- `accumulo.zooKeepers`
  - The Accumulo cluster's [zookeeper servers](https://accumulo.apache.org/1.8/accumulo_user_manual.html#_connecting).
  - Should contain a comma separated list of of hostname or hostname:port values.
  - No default value.

- `accumulo.columnFamily`
  - The name of the column family to use to store the data within the table.
  - No default value.

- `accumulo.instanceName`
  - Name of the Accumulo [instance](https://accumulo.apache.org/1.8/accumulo_user_manual.html#_connecting).
  - No default value.

- `accumulo.username`
  - The username to use when connecting to Accumulo.
  - No default value.
 
- `accumulo.password`
  - The password for the user connecting to Accumulo.
  - No default value.



================================================
FILE: accumulo1.8/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright (c) 2011 YCSB++ project, 2014 - 2016 YCSB contributors.
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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.ycsb</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.14.0-SNAPSHOT</version>
    <relativePath>../binding-parent</relativePath>
  </parent>
  <artifactId>accumulo1.8-binding</artifactId>
  <name>Accumulo 1.8 DB Binding</name>
  <properties>
    <!-- This should match up to the one from your Accumulo version -->
    <hadoop.version>2.6.4</hadoop.version>
    <!-- Tests do not run on jdk9 -->
    <skipJDK9Tests>true</skipJDK9Tests>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.accumulo</groupId>
      <artifactId>accumulo-core</artifactId>
      <version>${accumulo.1.8.version}</version>
    </dependency>
    <!-- Needed for hadoop.io.Text :( -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>${hadoop.version}</version>
      <exclusions>
        <exclusion>
          <groupId>jdk.tools</groupId>
          <artifactId>jdk.tools</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.accumulo</groupId>
      <artifactId>accumulo-minicluster</artifactId>
      <version>${accumulo.1.8.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- needed directly only in test, but transitive
         at runtime for accumulo, hadoop, and thrift. -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.13</version>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>../workloads</directory>
        <targetPath>workloads</targetPath>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
  </build>
</project>


================================================
FILE: accumulo1.8/src/main/conf/accumulo.properties
================================================
# 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


================================================
FILE: accumulo1.8/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java
================================================
/**
 * Copyright (c) 2011 YCSB++ project, 2014-2016 YCSB contributors.
 * 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.
 */

package com.yahoo.ycsb.db.accumulo;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.SortedMap;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.ClientConfiguration;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.WholeRowIterator;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.util.CleanUp;
import org.apache.hadoop.io.Text;

import com.yahoo.ycsb.ByteArrayByteIterator;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.Status;

/**
 * <a href="https://accumulo.apache.org/">Accumulo</a> binding for YCSB.
 */
public class AccumuloClient extends DB {

  private ZooKeeperInstance inst;
  private Connector connector;
  private Text colFam = new Text("");
  private byte[] colFamBytes = new byte[0];
  private final ConcurrentHashMap<String, BatchWriter> writers = new ConcurrentHashMap<>();

  static {
    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
      public void run() {
        CleanUp.shutdownNow();
      }
    });
  }

  @Override
  public void init() throws DBException {
    colFam = new Text(getProperties().getProperty("accumulo.columnFamily"));
    colFamBytes = colFam.toString().getBytes(UTF_8);

    inst = new ZooKeeperInstance(new ClientConfiguration()
        .withInstance(getProperties().getProperty("accumulo.instanceName"))
        .withZkHosts(getProperties().getProperty("accumulo.zooKeepers")));
    try {
      String principal = getProperties().getProperty("accumulo.username");
      AuthenticationToken token =
          new PasswordToken(getProperties().getProperty("accumulo.password"));
      connector = inst.getConnector(principal, token);
    } catch (AccumuloException | AccumuloSecurityException e) {
      throw new DBException(e);
    }

    if (!(getProperties().getProperty("accumulo.pcFlag", "none").equals("none"))) {
      System.err.println("Sorry, the ZK based producer/consumer implementation has been removed. " +
          "Please see YCSB issue #416 for work on adding a general solution to coordinated work.");
    }
  }

  @Override
  public void cleanup() throws DBException {
    try {
      Iterator<BatchWriter> iterator = writers.values().iterator();
      while (iterator.hasNext()) {
        BatchWriter writer = iterator.next();
        writer.close();
        iterator.remove();
      }
    } catch (MutationsRejectedException e) {
      throw new DBException(e);
    }
  }

  /**
   * Called when the user specifies a table that isn't the same as the existing
   * table. Connect to it and if necessary, close our current connection.
   * 
   * @param table
   *          The table to open.
   */
  public BatchWriter getWriter(String table) throws TableNotFoundException {
    // tl;dr We're paying a cost for the ConcurrentHashMap here to deal with the DB api.
    // We know that YCSB is really only ever going to send us data for one table, so using
    // a concurrent data structure is overkill (especially in such a hot code path).
    // However, the impact seems to be relatively negligible in trivial local tests and it's
    // "more correct" WRT to the API.
    BatchWriter writer = writers.get(table);
    if (null == writer) {
      BatchWriter newWriter = createBatchWriter(table);
      BatchWriter oldWriter = writers.putIfAbsent(table, newWriter);
      // Someone beat us to creating a BatchWriter for this table, use their BatchWriters
      if (null != oldWriter) {
        try {
          // Make sure to clean up our new batchwriter!
          newWriter.close();
        } catch (MutationsRejectedException e) {
          throw new RuntimeException(e);
        }
        writer = oldWriter;
      } else {
        writer = newWriter;
      }
    }
    return writer;
  }

  /**
   * Creates a BatchWriter with the expected configuration.
   *
   * @param table The table to write to
   */
  private BatchWriter createBatchWriter(String table) throws TableNotFoundException {
    BatchWriterConfig bwc = new BatchWriterConfig();
    bwc.setMaxLatency(
        Long.parseLong(getProperties()
            .getProperty("accumulo.batchWriterMaxLatency", "30000")),
        TimeUnit.MILLISECONDS);
    bwc.setMaxMemory(Long.parseLong(
        getProperties().getProperty("accumulo.batchWriterSize", "100000")));
    final String numThreadsValue = getProperties().getProperty("accumulo.batchWriterThreads");
    // Try to saturate the client machine.
    int numThreads = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);
    if (null != numThreadsValue) {
      numThreads = Integer.parseInt(numThreadsValue);
    }
    System.err.println("Using " + numThreads + " threads to write data");
    bwc.setMaxWriteThreads(numThreads);
    return connector.createBatchWriter(table, bwc);
  }

  /**
   * Gets a scanner from Accumulo over one row.
   *
   * @param row the row to scan
   * @param fields the set of columns to scan
   * @return an Accumulo {@link Scanner} bound to the given row and columns
   */
  private Scanner getRow(String table, Text row, Set<String> fields) throws TableNotFoundException {
    Scanner scanner = connector.createScanner(table, Authorizations.EMPTY);
    scanner.setRange(new Range(row));
    if (fields != null) {
      for (String field : fields) {
        scanner.fetchColumn(colFam, new Text(field));
      }
    }
    return scanner;
  }

  @Override
  public Status read(String table, String key, Set<String> fields,
                     Map<String, ByteIterator> result) {

    Scanner scanner = null;
    try {
      scanner = getRow(table, new Text(key), null);
      // Pick out the results we care about.
      final Text cq = new Text();
      for (Entry<Key, Value> entry : scanner) {
        entry.getKey().getColumnQualifier(cq);
        Value v = entry.getValue();
        byte[] buf = v.get();
        result.put(cq.toString(),
            new ByteArrayByteIterator(buf));
      }
    } catch (Exception e) {
      System.err.println("Error trying to reading Accumulo table " + table + " " + key);
      e.printStackTrace();
      return Status.ERROR;
    } finally {
      if (null != scanner) {
        scanner.close();
      }
    }
    return Status.OK;

  }

  @Override
  public Status scan(String table, String startkey, int recordcount,
      Set<String> fields, Vector<HashMap<String, ByteIterator>> result) {
    // Just make the end 'infinity' and only read as much as we need.
    Scanner scanner = null;
    try {
      scanner = connector.createScanner(table, Authorizations.EMPTY);
      scanner.setRange(new Range(new Text(startkey), null));

      // Have Accumulo send us complete rows, serialized in a single Key-Value pair
      IteratorSetting cfg = new IteratorSetting(100, WholeRowIterator.class);
      scanner.addScanIterator(cfg);

      // If no fields are provided, we assume one column/row.
      if (fields != null) {
        // And add each of them as fields we want.
        for (String field : fields) {
          scanner.fetchColumn(colFam, new Text(field));
        }
      }

      int count = 0;
      for (Entry<Key, Value> entry : scanner) {
        // Deserialize the row
        SortedMap<Key, Value> row = WholeRowIterator.decodeRow(entry.getKey(), entry.getValue());
        HashMap<String, ByteIterator> rowData;
        if (null != fields) {
          rowData = new HashMap<>(fields.size());
        } else {
          rowData = new HashMap<>();
        }
        result.add(rowData);
        // Parse the data in the row, avoid unnecessary Text object creation
        final Text cq = new Text();
        for (Entry<Key, Value> rowEntry : row.entrySet()) {
          rowEntry.getKey().getColumnQualifier(cq);
          rowData.put(cq.toString(), new ByteArrayByteIterator(rowEntry.getValue().get()));
        }
        if (count++ == recordcount) { // Done reading the last row.
          break;
        }
      }
    } catch (TableNotFoundException e) {
      System.err.println("Error trying to connect to Accumulo table.");
      e.printStackTrace();
      return Status.ERROR;
    } catch (IOException e) {
      System.err.println("Error deserializing data from Accumulo.");
      e.printStackTrace();
      return Status.ERROR;
    } finally {
      if (null != scanner) {
        scanner.close();
      }
    }

    return Status.OK;
  }

  @Override
  public Status update(String table, String key,
                       Map<String, ByteIterator> values) {
    BatchWriter bw = null;
    try {
      bw = getWriter(table);
    } catch (TableNotFoundException e) {
      System.err.println("Error opening batch writer to Accumulo table " + table);
      e.printStackTrace();
      return Status.ERROR;
    }

    Mutation mutInsert = new Mutation(key.getBytes(UTF_8));
    for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
      mutInsert.put(colFamBytes, entry.getKey().getBytes(UTF_8), entry.getValue().toArray());
    }

    try {
      bw.addMutation(mutInsert);
    } catch (MutationsRejectedException e) {
      System.err.println("Error performing update.");
      e.printStackTrace();
      return Status.ERROR;
    }

    return Status.BATCHED_OK;
  }

  @Override
  public Status insert(String t, String key,
                       Map<String, ByteIterator> values) {
    return update(t, key, values);
  }

  @Override
  public Status delete(String table, String key) {
    BatchWriter bw;
    try {
      bw = getWriter(table);
    } catch (TableNotFoundException e) {
      System.err.println("Error trying to connect to Accumulo table.");
      e.printStackTrace();
      return Status.ERROR;
    }

    try {
      deleteRow(table, new Text(key), bw);
    } catch (TableNotFoundException | MutationsRejectedException e) {
      System.err.println("Error performing delete.");
      e.printStackTrace();
      return Status.ERROR;
    } catch (RuntimeException e) {
      System.err.println("Error performing delete.");
      e.printStackTrace();
      return Status.ERROR;
    }

    return Status.OK;
  }

  // These functions are adapted from RowOperations.java:
  private void deleteRow(String table, Text row, BatchWriter bw) throws MutationsRejectedException,
          TableNotFoundException {
    // TODO Use a batchDeleter instead
    deleteRow(getRow(table, row, null), bw);
  }

  /**
   * Deletes a row, given a Scanner of JUST that row.
   */
  private void deleteRow(Scanner scanner, BatchWriter bw) throws MutationsRejectedException {
    Mutation deleter = null;
    // iterate through the keys
    final Text row = new Text();
    final Text cf = new Text();
    final Text cq = new Text();
    for (Entry<Key, Value> entry : scanner) {
      // create a mutation for the row
      if (deleter == null) {
        entry.getKey().getRow(row);
        deleter = new Mutation(row);
      }
      entry.getKey().getColumnFamily(cf);
      entry.getKey().getColumnQualifier(cq);
      // the remove function adds the key with the delete flag set to true
      deleter.putDelete(cf, cq);
    }

    bw.addMutation(deleter);
  }
}


================================================
FILE: accumulo1.8/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java
================================================
/**
 * Copyright (c) 2015 YCSB contributors. 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.
 */

/**
 * YCSB binding for <a href="https://accumulo.apache.org/">Apache Accumulo</a>.
 */
package com.yahoo.ycsb.db.accumulo;



================================================
FILE: accumulo1.8/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java
================================================
/*
 * Copyright (c) 2016 YCSB contributors.
 * 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.
 */

package com.yahoo.ycsb.db.accumulo;


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

import java.util.Map.Entry;
import java.util.Properties;

import com.yahoo.ycsb.Workload;
import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.measurements.Measurements;
import com.yahoo.ycsb.workloads.CoreWorkload;

import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.TablePermission;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Use an Accumulo MiniCluster to test out basic workload operations with
 * the Accumulo binding.
 */
public class AccumuloTest {
  private static final Logger LOG = LoggerFactory.getLogger(AccumuloTest.class);
  private static final int INSERT_COUNT = 2000;
  private static final int TRANSACTION_COUNT = 2000;

  @ClassRule
  public static TemporaryFolder workingDir = new TemporaryFolder();
  @Rule
  public TestName test = new TestName();

  private static MiniAccumuloCluster cluster;
  private static Properties properties;
  private Workload workload;
  private DB client;
  private Properties workloadProps;

  private static boolean isWindows() {
    final String os = System.getProperty("os.name");
    return os.startsWith("Windows");
  }

  @BeforeClass
  public static void setup() throws Exception {
    // Minicluster setup fails on Windows with an UnsatisfiedLinkError.
    // Skip if windows.
    assumeTrue(!isWindows());
    cluster = new MiniAccumuloCluster(workingDir.newFolder("accumulo").getAbsoluteFile(), "protectyaneck");
    LOG.debug("starting minicluster");
    cluster.start();
    LOG.debug("creating connection for admin operations.");
    // set up the table and user
    final Connector admin = cluster.getConnector("root", "protectyaneck");
    admin.tableOperations().create(CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
    admin.securityOperations().createLocalUser("ycsb", new PasswordToken("protectyaneck"));
    admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.READ);
    admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.WRITE);

    // set properties the binding will read
    properties = new Properties();
    properties.setProperty("accumulo.zooKeepers", cluster.getZooKeepers());
    properties.setProperty("accumulo.instanceName", cluster.getInstanceName());
    properties.setProperty("accumulo.columnFamily", "family");
    properties.setProperty("accumulo.username", "ycsb");
    properties.setProperty("accumulo.password", "protectyaneck");
    // cut down the batch writer timeout so that writes will push through.
    properties.setProperty("accumulo.batchWriterMaxLatency", "4");
    // set these explicitly to the defaults at the time we're compiled, since they'll be inlined in our class.
    properties.setProperty(CoreWorkload.TABLENAME_PROPERTY, CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
    properties.setProperty(CoreWorkload.FIELD_COUNT_PROPERTY, CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT);
    properties.setProperty(CoreWorkload.INSERT_ORDER_PROPERTY, "ordered");
  }

  @AfterClass
  public static void clusterCleanup() throws Exception {
    if (cluster != null) {
      LOG.debug("shutting down minicluster");
      cluster.stop();
      cluster = null;
    }
  }

  @Before
  public void client() throws Exception {

    LOG.debug("Loading workload properties for {}", test.getMethodName());
    workloadProps = new Properties();
    workloadProps.load(getClass().getResourceAsStream("/workloads/" + test.getMethodName()));

    for (String prop : properties.stringPropertyNames()) {
      workloadProps.setProperty(prop, properties.getProperty(prop));
    }

    // TODO we need a better test rig for 'run this ycsb workload'
    LOG.debug("initializing measurements and workload");
    Measurements.setProperties(workloadProps);
    workload = new CoreWorkload();
    workload.init(workloadProps);

    LOG.debug("initializing client");
    client = new AccumuloClient();
    client.setProperties(workloadProps);
    client.init();
  }

  @After
  public void cleanup() throws Exception {
    if (client != null) {
      LOG.debug("cleaning up client");
      client.cleanup();
      client = null;
    }
    if (workload != null) {
      LOG.debug("cleaning up workload");
      workload.cleanup();
    }
  }

  @After
  public void truncateTable() throws Exception {
    if (cluster != null) {
      LOG.debug("truncating table {}", CoreWorkload.TABLENAME_PROPERTY_DEFAULT);
      final Connector admin = cluster.getConnector("root", "protectyaneck");
      admin.tableOperations().deleteRows(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, null, null);
    }
  }

  @Test
  public void workloada() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadb() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadc() throws Exception {
    runWorkload();
  }

  @Test
  public void workloadd() throws Exception {
    runWorkload();
  }

  @Test
  public void workloade() throws Exception {
    runWorkload();
  }

  /**
   * go through a workload cycle.
   * <ol>
   *   <li>initialize thread-specific state
   *   <li>load the workload dataset
   *   <li>run workload transactions
   * </ol>
   */
  private void runWorkload() throws Exception {
    final Object state = workload.initThread(workloadProps,0,0);
    LOG.debug("load");
    for (int i = 0; i < INSERT_COUNT; i++) {
      assertTrue("insert failed.", workload.doInsert(client, state));
    }
    // Ensure we wait long enough for the batch writer to flush
    // TODO accumulo client should be flushing per insert by default.
    Thread.sleep(2000);
    LOG.debug("verify number of cells");
    final Scanner scanner = cluster.getConnector("root", "protectyaneck").createScanner(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, Authorizations.EMPTY);
    int count = 0;
    for (Entry<Key, Value> entry : scanner) {
      count++;
    }
    assertEquals("Didn't get enough total cells.", (Integer.valueOf(CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT) * INSERT_COUNT), count);
    LOG.debug("run");
    for (int i = 0; i < TRANSACTION_COUNT; i++) {
      assertTrue("transaction failed.", workload.doTransaction(client, state));
    }
  }
}


================================================
FILE: accumulo1.8/src/test/resources/log4j.properties
================================================
#
# Copyright (c) 2015 YCSB contributors. 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.
#

# Root logger option
log4j.rootLogger=INFO, stderr

log4j.appender.stderr=org.apache.log4j.ConsoleAppender
log4j.appender.stderr.target=System.err
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n

# Suppress messages from ZooKeeper
log4j.logger.com.yahoo.ycsb.db.accumulo=DEBUG
log4j.logger.org.apache.zookeeper=ERROR
log4j.logger.org.apache.accumulo=WARN


================================================
FILE: aerospike/README.md
================================================
<!--
Copyright (c) 2015 YCSB contributors. 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.
-->

## Quick Start

This section describes how to run YCSB on Aerospike. 

### 1. Start Aerospike

### 2. Install Java and Maven

### 3. Set Up YCSB

Git clone YCSB and compile:

    git clone http://github.com/brianfrankcooper/YCSB.git
    cd YCSB
    mvn -pl com.yahoo.ycsb:aerospike-binding -am clean package

### 4. Provide Aerospike Connection Parameters

The following connection parameters are available.

  * `as.host` - The Aerospike cluster to connect to (default: `localhost`)
  * `as.port` - The port to connect to (default: `3000`)
  * `as.user` - The user to connect as (no default)
  * `as.password` - The password for the user (no default)
  * `as.timeout` - The transaction and connection timeout (in ms, default: `10000`)
  * `as.namespace` - The namespace to be used for the benchmark (default: `ycsb`)

Add them to the workload or set them with the shell command, as in:

    ./bin/ycsb load aerospike -s -P workloads/workloada -p as.timeout=5000 >outputLoad.txt

### 5. Load Data and Run Tests

Load the data:

    ./bin/ycsb load aerospike -s -P workloads/workloada >outputLoad.txt

Run the workload test:

    ./bin/ycsb run aerospike -s -P workloads/workloada >outputRun.txt



================================================
FILE: aerospike/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright (c) 2015-2016 YCSB contributors. 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.ycsb</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.14.0-SNAPSHOT</version>
    <relativePath>../binding-parent</relativePath>
  </parent>

  <artifactId>aerospike-binding</artifactId>
  <name>Aerospike DB Binding</name>
  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>com.aerospike</groupId>
      <artifactId>aerospike-client</artifactId>
      <version>${aerospike.version}</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</project>


================================================
FILE: aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java
================================================
/**
 * Copyright (c) 2015 YCSB contributors. 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.
 */

package com.yahoo.ycsb.db;

import com.aerospike.client.AerospikeException;
import com.aerospike.client.Bin;
import com.aerospike.client.Key;
import com.aerospike.client.Record;
import com.aerospike.client.policy.ClientPolicy;
import com.aerospike.client.policy.Policy;
import com.aerospike.client.policy.RecordExistsAction;
import com.aerospike.client.policy.WritePolicy;
import com.yahoo.ycsb.ByteArrayByteIterator;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.Status;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.Vector;

/**
 * YCSB binding for <a href="http://www.aerospike.com/">Areospike</a>.
 */
public class AerospikeClient extends com.yahoo.ycsb.DB {
  private static final String DEFAULT_HOST = "localhost";
  private static final String DEFAULT_PORT = "3000";
  private static final String DEFAULT_TIMEOUT = "10000";
  private static final String DEFAULT_NAMESPACE = "ycsb";

  private String namespace = null;

  private com.aerospike.client.AerospikeClient client = null;

  private Policy readPolicy = new Policy();
  private WritePolicy insertPolicy = new WritePolicy();
  private WritePolicy updatePolicy = new WritePolicy();
  private WritePolicy deletePolicy = new WritePolicy();

  @Override
  public void init() throws DBException {
    insertPolicy.recordExistsAction = RecordExistsAction.CREATE_ONLY;
    updatePolicy.recordExistsAction = RecordExistsAction.REPLACE_ONLY;

    Properties props = getProperties();

    namespace = props.getProperty("as.namespace", DEFAULT_NAMESPACE);

    String host = props.getProperty("as.host", DEFAULT_HOST);
    String user = props.getProperty("as.user");
    String password = props.getProperty("as.password");
    int port = Integer.parseInt(props.getProperty("as.port", DEFAULT_PORT));
    int timeout = Integer.parseInt(props.getProperty("as.timeout",
        DEFAULT_TIMEOUT));

    readPolicy.timeout = timeout;
    insertPolicy.timeout = timeout;
    updatePolicy.timeout = timeout;
    deletePolicy.timeout = timeout;

    ClientPolicy clientPolicy = new ClientPolicy();

    if (user != null && password != null) {
      clientPolicy.user = user;
      clientPolicy.password = password;
    }

    try {
      client =
          new com.aerospike.client.AerospikeClient(clientPolicy, host, port);
    } catch (AerospikeException e) {
      throw new DBException(String.format("Error while creating Aerospike " +
          "client for %s:%d.", host, port), e);
    }
  }

  @Override
  public void cleanup() throws DBException {
    client.close();
  }

  @Override
  public Status read(String table, String key, Set<String> fields,
      Map<String, ByteIterator> result) {
    try {
      Record record;

      if (fields != null) {
        record = client.get(readPolicy, new Key(namespace, table, key),
            fields.toArray(new String[fields.size()]));
      } else {
        record = client.get(readPolicy, new Key(namespace, table, key));
      }

      if (record == null) {
        System.err.println("Record key " + key + " not found (read)");
        return Status.ERROR;
      }

      for (Map.Entry<String, Object> entry: record.bins.entrySet()) {
        result.put(entry.getKey(),
            new ByteArrayByteIterator((byte[])entry.getValue()));
      }

      return Status.OK;
    } catch (AerospikeException e) {
      System.err.println("Error while reading key " + key + ": " + e);
      return Status.ERROR;
    }
  }

  @Override
  public Status scan(String table, String start, int count, Set<String> fields,
      Vector<HashMap<String, ByteIterator>> result) {
    System.err.println("Scan not implemented");
    return Status.ERROR;
  }

  private Status write(String table, String key, WritePolicy writePolicy,
      Map<String, ByteIterator> values) {
    Bin[] bins = new Bin[values.size()];
    int index = 0;

    for (Map.Entry<String, ByteIterator> entry: values.entrySet()) {
      bins[index] = new Bin(entry.getKey(), entry.getValue().toArray());
      ++index;
    }

    Key keyObj = new Key(namespace, table, key);

    try {
      client.put(writePolicy, keyObj, bins);
      return Status.OK;
    } catch (AerospikeException e) {
      System.err.println("Error while writing key " + key + ": " + e);
      return Status.ERROR;
    }
  }

  @Override
  public Status update(String table, String key,
                       Map<String, ByteIterator> values) {
    return write(table, key, updatePolicy, values);
  }

  @Override
  public Status insert(String table, String key,
                       Map<String, ByteIterator> values) {
    return write(table, key, insertPolicy, values);
  }

  @Override
  public Status delete(String table, String key) {
    try {
      if (!client.delete(deletePolicy, new Key(namespace, table, key))) {
        System.err.println("Record key " + key + " not found (delete)");
        return Status.ERROR;
      }

      return Status.OK;
    } catch (AerospikeException e) {
      System.err.println("Error while deleting key " + key + ": " + e);
      return Status.ERROR;
    }
  }
}


================================================
FILE: aerospike/src/main/java/com/yahoo/ycsb/db/package-info.java
================================================
/**
 * Copyright (c) 2015 YCSB contributors. 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.
 */

/**
 * YCSB binding for <a href="http://www.aerospike.com/">Areospike</a>.
 */
package com.yahoo.ycsb.db;


================================================
FILE: arangodb/.gitignore
================================================
/bin/


================================================
FILE: arangodb/README.md
================================================
<!--
Copyright (c) 2012 - 2015 YCSB contributors. 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.
-->

## Quick Start

This section describes how to run YCSB on ArangoDB. 

### 1. Start ArangoDB
See https://docs.arangodb.com/Installing/index.html

### 2. Install Java and Maven

Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html

and get the url to download the rpm into your server. For example:

    wget http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.rpm?AuthParam=11232426132 -o jdk-7u40-linux-x64.rpm
    rpm -Uvh jdk-7u40-linux-x64.rpm
    
Or install via yum/apt-get

    sudo yum install java-devel

Download MVN from http://maven.apache.org/download.cgi

    wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
    sudo tar xzf apache-maven-*-bin.tar.gz -C /usr/local
    cd /usr/local
    sudo ln -s apache-maven-* maven
    sudo vi /etc/profile.d/maven.sh

Add the following to `maven.sh`

    export M2_HOME=/usr/local/maven
    export PATH=${M2_HOME}/bin:${PATH}

Reload bash and test mvn

    bash
    mvn -version

### 3. Set Up YCSB

Clone this YCSB source code:

    git clone https://github.com/brianfrankcooper/YCSB.git

### 4. Run YCSB

Now you are ready to run! First, drop the existing collection: "usertable" under database "ycsb":
	
	db._collection("usertable").drop()

Then, load the data:

    ./bin/ycsb load arangodb -s -P workloads/workloada -p arangodb.ip=xxx -p arangodb.port=xxx

Then, run the workload:

    ./bin/ycsb run arangodb -s -P workloads/workloada -p arangodb.ip=xxx -p arangodb.port=xxx

See the next section for the list of configuration parameters for ArangoDB.

## ArangoDB Configuration Parameters

- `arangodb.ip`
  - Default value is `localhost`

- `arangodb.port`
  - Default value is `8529`.
  
- `arangodb.waitForSync`
  - Default value is `true`.
  
- `arangodb.transactionUpdate`
  - Default value is `false`.

- `arangodb.dropDBBeforeRun`
  - Default value is `false`.


================================================
FILE: arangodb/conf/logback.xml
================================================
<!-- 
Copyright (c) 2012 YCSB contributors. 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.
-->

<configuration>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <root level="info">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>


================================================
FILE: arangodb/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright (c) 2012 - 2016 YCSB contributors. 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.ycsb</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.14.0-SNAPSHOT</version>
    <relativePath>../binding-parent</relativePath>
  </parent>

  <artifactId>arangodb-binding</artifactId>
  <name>ArangoDB Binding</name>
  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>com.arangodb</groupId>
      <artifactId>arangodb-java-driver</artifactId>
      <version>${arangodb.version}</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.7.13</version>
		<type>jar</type>
		<scope>compile</scope>
	</dependency>
	<dependency>
		<groupId>ch.qos.logback</groupId>
		<artifactId>logback-classic</artifactId>
		<version>1.1.3</version>
		<type>jar</type>
		<scope>provided</scope>
	</dependency>
	<dependency>
		<groupId>ch.qos.logback</groupId>
		<artifactId>logback-core</artifactId>
		<version>1.1.3</version>
		<type>jar</type>
		<scope>provided</scope>
	</dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


================================================
FILE: arangodb/src/main/java/com/yahoo/ycsb/db/ArangoDBClient.java
================================================
/**
 * Copyright (c) 2012 - 2015 YCSB contributors. 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.
 */
package com.yahoo.ycsb.db;

import com.arangodb.ArangoConfigure;
import com.arangodb.ArangoDriver;
import com.arangodb.ArangoException;
import com.arangodb.ArangoHost;
import com.arangodb.DocumentCursor;
import com.arangodb.ErrorNums;
import com.arangodb.entity.BaseDocument;
import com.arangodb.entity.DocumentEntity;
import com.arangodb.entity.EntityFactory;
import com.arangodb.entity.TransactionEntity;
import com.arangodb.util.MapBuilder;

import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.Status;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.StringByteIterator;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicInteger;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * ArangoDB binding for YCSB framework using the ArangoDB Inc. <a
 * href="https://github.com/arangodb/arangodb-java-driver">driver</a>
 * <p>
 * See the <code>README.md</code> for configuration information.
 * </p>
 * 
 * @see <a href="https://github.com/arangodb/arangodb-java-driver">ArangoDB Inc.
 *      driver</a>
 */
public class ArangoDBClient extends DB {

  private static Logger logger = LoggerFactory.getLogger(ArangoDBClient.class);
  
  /**
   * The database name to access.
   */
  private static String databaseName = "ycsb";

  /**
   * Count the number of times initialized to teardown on the last
   * {@link #cleanup()}.
   */
  private static final AtomicInteger INIT_COUNT = new AtomicInteger(0);

  /** ArangoDB Driver related, Singleton. */
  private static ArangoDriver arangoDriver;
  private static Boolean dropDBBeforeRun;
  private static Boolean waitForSync = true;
  private static Boolean transactionUpdate = false;

  /**
   * Initialize any state for this DB. Called once per DB instance; there is
   * one DB instance per client thread.
   * 
   * Actually, one client process will share one DB instance here.(Coincide to
   * mongoDB driver)
   */
  @Override
  public void init() throws DBException {
    INIT_COUNT.incrementAndGet();
    synchronized (ArangoDBClient.class) {
      if (arangoDriver != null) {
        return;
      }

      Properties props = getProperties();

      // Set the DB address
      String ip = props.getProperty("arangodb.ip", "localhost");
      String portStr = props.getProperty("arangodb.port", "8529");
      int port = Integer.parseInt(portStr);

      // If clear db before run
      String dropDBBeforeRunStr = props.getProperty("arangodb.dropDBBeforeRun", "false");
      dropDBBeforeRun = Boolean.parseBoolean(dropDBBeforeRunStr);
      
      // Set the sync mode
      String waitForSyncStr = props.getProperty("arangodb.waitForSync", "false");
      waitForSync = Boolean.parseBoolean(waitForSyncStr);
      
      // Set if transaction for update
      String transactionUpdateStr = props.getProperty("arangodb.transactionUpdate", "false");
      transactionUpdate = Boolean.parseBoolean(transactionUpdateStr);
      
      // Init ArangoDB connection
      try {
        ArangoConfigure arangoConfigure = new ArangoConfigure();
        arangoConfigure.setArangoHost(new ArangoHost(ip, port));
        arangoConfigure.init();
        arangoDriver = new ArangoDriver(arangoConfigure);
      } catch (Exception e) {
        logger.error("Failed to initialize ArangoDB", e);
        System.exit(-1);
      }

      // Init the database
      if (dropDBBeforeRun) {
        // Try delete first
        try {
          arangoDriver.deleteDatabase(databaseName);
        } catch (ArangoException e) {
          if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_DATABASE_NOT_FOUND) {
            logger.error("Failed to delete database: {} with ex: {}", databaseName, e.toString());
            System.exit(-1);
          } else {
            logger.info("Fail to delete DB, already deleted: {}", databaseName);
          }
        }
      }
      try {
        arangoDriver.createDatabase(databaseName);
        logger.info("Database created: " + databaseName);
      } catch (ArangoException e) {
        if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_DUPLICATE_NAME) {
          logger.error("Failed to create database: {} with ex: {}", databaseName, e.toString());
          System.exit(-1);
        } else {
          logger.info("DB already exists: {}", databaseName);
        }
      }
      // Always set the default db
      arangoDriver.setDefaultDatabase(databaseName);
      logger.info("ArangoDB client connection created to {}:{}", ip, port);
      
      // Log the configuration
      logger.info("Arango Configuration: dropDBBeforeRun: {}; address: {}:{}; databaseName: {};"
                  + " waitForSync: {}; transactionUpdate: {};",
                  dropDBBeforeRun, ip, port, databaseName, waitForSync, transactionUpdate);
    }
  }

  /**
   * Cleanup any state for this DB. Called once per DB instance; there is one
   * DB instance per client thread.
   * 
   * Actually, one client process will share one DB instance here.(Coincide to
   * mongoDB driver)
   */
  @Override
  public void cleanup() throws DBException {
    if (INIT_COUNT.decrementAndGet() == 0) {
      arangoDriver = null;
      logger.info("Local cleaned up.");
    }
  }

  /**
   * Insert a record in the database. Any field/value pairs in the specified
   * values HashMap will be written into the record with the specified record
   * key.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to insert.
   * @param values
   *      A HashMap of field/value pairs to insert in the record
   * @return Zero on success, a non-zero error code on error. See the
   *     {@link DB} class's description for a discussion of error codes.
   */
  @Override
  public Status insert(String table, String key, Map<String, ByteIterator> values) {
    try {
      BaseDocument toInsert = new BaseDocument(key);
      for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
        toInsert.addAttribute(entry.getKey(), byteIteratorToString(entry.getValue()));
      }
      arangoDriver.createDocument(table, toInsert, true/*create collection if not exist*/,
                                  waitForSync);
      return Status.OK;
    } catch (ArangoException e) {
      if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED) {
        logger.error("Fail to insert: {} {} with ex {}", table, key, e.toString());
      } else {
        logger.debug("Trying to create document with duplicate key: {} {}", table, key);
        return Status.BAD_REQUEST;
      }
    }  catch (RuntimeException e) {
      logger.error("Exception while trying insert {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Read a record from the database. Each field/value pair from the result
   * will be stored in a HashMap.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to read.
   * @param fields
   *      The list of fields to read, or null for all of them
   * @param result
   *      A HashMap of field/value pairs for the result
   * @return Zero on success, a non-zero error code on error or "not found".
   */
  @SuppressWarnings("unchecked")
  @Override
  public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) {
    try {
      DocumentEntity<BaseDocument> targetDoc = arangoDriver.getDocument(table, key, BaseDocument.class);
      BaseDocument aDocument = targetDoc.getEntity();
      if (!this.fillMap(result, aDocument.getProperties(), fields)) {
        return Status.ERROR;
      }
      return Status.OK;
    } catch (ArangoException e) {
      if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_DOCUMENT_NOT_FOUND) {
        logger.error("Fail to read: {} {} with ex {}", table, key, e.toString());
      } else {
        logger.debug("Trying to read document not exist: {} {}", table, key);
        return Status.NOT_FOUND;
      }
    } catch (RuntimeException e) {
      logger.error("Exception while trying read {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Update a record in the database. Any field/value pairs in the specified
   * values HashMap will be written into the record with the specified record
   * key, overwriting any existing values with the same field name.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to write.
   * @param values
   *      A HashMap of field/value pairs to update in the record
   * @return Zero on success, a non-zero error code on error. See this class's
   *     description for a discussion of error codes.
   */
  @Override
  public Status update(String table, String key, Map<String, ByteIterator> values) {
    try {
      
      if (!transactionUpdate) {
        BaseDocument updateDoc = new BaseDocument();
        for (String field : values.keySet()) {
          updateDoc.addAttribute(field, byteIteratorToString(values.get(field)));
        }
        arangoDriver.updateDocument(table, key, updateDoc);
        return Status.OK;
      } else {
        // id for documentHandle
        String transactionAction = "function (id) {"
               // use internal database functions
            + "var db = require('internal').db;"
              // collection.update(document, data, overwrite, keepNull, waitForSync)
            + String.format("db._update(id, %s, true, false, %s);}",
                mapToJson(values), Boolean.toString(waitForSync).toLowerCase());
        TransactionEntity transaction = arangoDriver.createTransaction(transactionAction);
        transaction.addWriteCollection(table);
        transaction.setParams(createDocumentHandle(table, key));
        arangoDriver.executeTransaction(transaction);
        return Status.OK;
      }
    } catch (ArangoException e) {
      if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_DOCUMENT_NOT_FOUND) {
        logger.error("Fail to update: {} {} with ex {}", table, key, e.toString());
      } else {
        logger.debug("Trying to update document not exist: {} {}", table, key);
        return Status.NOT_FOUND;
      }
    } catch (RuntimeException e) {
      logger.error("Exception while trying update {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Delete a record from the database.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to delete.
   * @return Zero on success, a non-zero error code on error. See the
   *     {@link DB} class's description for a discussion of error codes.
   */
  @Override
  public Status delete(String table, String key) {
    try {
      arangoDriver.deleteDocument(table, key);
      return Status.OK;
    } catch (ArangoException e) {
      if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_DOCUMENT_NOT_FOUND) {
        logger.error("Fail to delete: {} {} with ex {}", table, key, e.toString());
      } else {
        logger.debug("Trying to delete document not exist: {} {}", table, key);
        return Status.NOT_FOUND;
      }
    } catch (RuntimeException e) {
      logger.error("Exception while trying delete {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Perform a range scan for a set of records in the database. Each
   * field/value pair from the result will be stored in a HashMap.
   * 
   * @param table
   *      The name of the table
   * @param startkey
   *      The record key of the first record to read.
   * @param recordcount
   *      The number of records to read
   * @param fields
   *      The list of fields to read, or null for all of them
   * @param result
   *      A Vector of HashMaps, where each HashMap is a set field/value
   *      pairs for one record
   * @return Zero on success, a non-zero error code on error. See the
   *     {@link DB} class's description for a discussion of error codes.
   */
  @Override
  public Status scan(String table, String startkey, int recordcount, Set<String> fields,
      Vector<HashMap<String, ByteIterator>> result) {
    DocumentCursor<BaseDocument> cursor = null;
    try {
      String aqlQuery = String.format(
          "FOR target IN %s FILTER target._key >= @key SORT target._key ASC LIMIT %d RETURN %s ", table,
          recordcount, constructReturnForAQL(fields, "target"));

      Map<String, Object> bindVars = new MapBuilder().put("key", startkey).get();
      cursor = arangoDriver.executeDocumentQuery(aqlQuery, bindVars, null, BaseDocument.class);
      Iterator<BaseDocument> iterator = cursor.entityIterator();
      while (iterator.hasNext()) {
        BaseDocument aDocument = iterator.next();
        HashMap<String, ByteIterator> aMap = new HashMap<String, ByteIterator>(aDocument.getProperties().size());
        if (!this.fillMap(aMap, aDocument.getProperties())) {
          return Status.ERROR;
        }
        result.add(aMap);
      }
      return Status.OK;
    } catch (Exception e) {
      logger.error("Exception while trying scan {} {} {} with ex {}", table, startkey, recordcount, e.toString());
    } finally {
      if (cursor != null) {
        try {
          cursor.close();
        } catch (ArangoException e) {
          logger.error("Fail to close cursor", e);
        }
      }
    }
    return Status.ERROR;
  }

  private String createDocumentHandle(String collectionName, String documentKey) throws ArangoException {
    validateCollectionName(collectionName);
    return collectionName + "/" + documentKey;
  }

  private void validateCollectionName(String name) throws ArangoException {
    if (name.indexOf('/') != -1) {
      throw new ArangoException("does not allow '/' in name.");
    }
  }

  
  private String constructReturnForAQL(Set<String> fields, String targetName) {
    // Construct the AQL query string.
    String resultDes = targetName;
    if (fields != null && fields.size() != 0) {
      StringBuilder builder = new StringBuilder("{");
      for (String field : fields) {
        builder.append(String.format("\n\"%s\" : %s.%s,", field, targetName, field));
      }
      //Replace last ',' to newline.
      builder.setCharAt(builder.length() - 1, '\n');
      builder.append("}");
      resultDes = builder.toString();
    }
    return resultDes;
  }
  
  private boolean fillMap(Map<String, ByteIterator> resultMap, Map<String, Object> properties) {
    return fillMap(resultMap, properties, null);
  }
  
  /**
   * Fills the map with the properties from the BaseDocument.
   * 
   * @param resultMap
   *      The map to fill/
   * @param obj
   *      The object to copy values from.
   * @return isSuccess
   */
  @SuppressWarnings("unchecked")
  private boolean fillMap(Map<String, ByteIterator> resultMap, Map<String, Object> properties, Set<String> fields) {
    if (fields == null || fields.size() == 0) {
      for (Map.Entry<String, Object> entry : properties.entrySet()) {
        if (entry.getValue() instanceof String) {
          resultMap.put(entry.getKey(),
              stringToByteIterator((String)(entry.getValue())));
        } else {
          logger.error("Error! Not the format expected! Actually is {}",
              entry.getValue().getClass().getName());
          return false;
        }
      }
    } else {
      for (String field : fields) {
        if (properties.get(field) instanceof String) {
          resultMap.put(field, stringToByteIterator((String)(properties.get(field))));
        } else {
          logger.error("Error! Not the format expected! Actually is {}",
              properties.get(field).getClass().getName());
          return false;
        }
      }
    }
    return true;
  }
  
  private String byteIteratorToString(ByteIterator byteIter) {
    return new String(byteIter.toArray());
  }

  private ByteIterator stringToByteIterator(String content) {
    return new StringByteIterator(content);
  }
  
  private String mapToJson(Map<String, ByteIterator> values) {
    Map<String, String> intervalRst = new HashMap<String, String>();
    for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
      intervalRst.put(entry.getKey(), byteIteratorToString(entry.getValue()));
    }
    return EntityFactory.toJsonString(intervalRst);
  }
  
}


================================================
FILE: arangodb/src/main/java/com/yahoo/ycsb/db/package-info.java
================================================
/**
 * Copyright (c) 2012 - 2015 YCSB contributors. 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.
 */

/**
 * The YCSB binding for <a href="https://www.arangodb.com/">ArangoDB</a>.
 */
package com.yahoo.ycsb.db;



================================================
FILE: arangodb3/.gitignore
================================================


================================================
FILE: arangodb3/README.md
================================================
<!--
Copyright (c) 2017 YCSB contributors. 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.
-->

## Quick Start

This section describes how to run YCSB on ArangoDB. 

### 1. Start ArangoDB
See https://docs.arangodb.com/Installing/index.html

### 2. Install Java and Maven

Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html

and get the url to download the rpm into your server. For example:

    wget http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.rpm?AuthParam=11232426132 -o jdk-7u40-linux-x64.rpm
    rpm -Uvh jdk-7u40-linux-x64.rpm
    
Or install via yum/apt-get

    sudo yum install java-devel

Download MVN from http://maven.apache.org/download.cgi

    wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
    sudo tar xzf apache-maven-*-bin.tar.gz -C /usr/local
    cd /usr/local
    sudo ln -s apache-maven-* maven
    sudo vi /etc/profile.d/maven.sh

Add the following to `maven.sh`

    export M2_HOME=/usr/local/maven
    export PATH=${M2_HOME}/bin:${PATH}

Reload bash and test mvn

    bash
    mvn -version

### 3. Set Up YCSB

Clone this YCSB source code:

    git clone https://github.com/brianfrankcooper/YCSB.git

### 4. Run YCSB

Now you are ready to run! First, drop the existing collection: "usertable" under database "ycsb":
	
	db._collection("usertable").drop()

Then, load the data:

    ./bin/ycsb load arangodb3 -s -P workloads/workloada -p arangodb.ip=xxx -p arangodb.port=xxx

Then, run the workload:

    ./bin/ycsb run arangodb3 -s -P workloads/workloada -p arangodb.ip=xxx -p arangodb.port=xxx

See the next section for the list of configuration parameters for ArangoDB.

## ArangoDB Configuration Parameters

- `arangodb.ip`
  - Default value is `localhost`

- `arangodb.port`
  - Default value is `8529`.
  
- `arangodb.waitForSync`
  - Default value is `true`.
  
- `arangodb.transactionUpdate`
  - Default value is `false`.

- `arangodb.dropDBBeforeRun`
  - Default value is `false`.


================================================
FILE: arangodb3/conf/logback.xml
================================================
<!-- 
Copyright (c) 2017 YCSB contributors. 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.
-->

<configuration>

  <appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <root level="info">
    <appender-ref ref="STDERR" />
  </root>
</configuration>


================================================
FILE: arangodb3/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright (c) 2017 YCSB contributors. 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.ycsb</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.14.0-SNAPSHOT</version>
    <relativePath>../binding-parent</relativePath>
  </parent>

  <artifactId>arangodb3-binding</artifactId>
  <name>ArangoDB3 Binding</name>
  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>com.arangodb</groupId>
      <artifactId>arangodb-java-driver</artifactId>
      <version>${arangodb3.version}</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.7.13</version>
		<type>jar</type>
		<scope>compile</scope>
	</dependency>
	<dependency>
		<groupId>ch.qos.logback</groupId>
		<artifactId>logback-classic</artifactId>
		<version>1.1.3</version>
		<type>jar</type>
		<scope>provided</scope>
	</dependency>
	<dependency>
		<groupId>ch.qos.logback</groupId>
		<artifactId>logback-core</artifactId>
		<version>1.1.3</version>
		<type>jar</type>
		<scope>provided</scope>
	</dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


================================================
FILE: arangodb3/src/main/java/com/yahoo/ycsb/db/arangodb/ArangoDB3Client.java
================================================
/**
 * Copyright (c) 2017 YCSB contributors. 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.
 */
package com.yahoo.ycsb.db.arangodb;

import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.Vector;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicInteger;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.arangodb.ArangoCursor;
import com.arangodb.ArangoDB;
import com.arangodb.ArangoDBException;
import com.arangodb.entity.BaseDocument;
import com.arangodb.model.DocumentCreateOptions;
import com.arangodb.model.TransactionOptions;
import com.arangodb.util.MapBuilder;
import com.arangodb.velocypack.VPackBuilder;
import com.arangodb.velocypack.VPackSlice;
import com.arangodb.velocypack.ValueType;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.DB;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.Status;
import com.yahoo.ycsb.StringByteIterator;

/**
 * ArangoDB binding for YCSB framework using the ArangoDB Inc. <a
 * href="https://github.com/arangodb/arangodb-java-driver">driver</a>
 * <p>
 * See the <code>README.md</code> for configuration information.
 * </p>
 * 
 * @see <a href="https://github.com/arangodb/arangodb-java-driver">ArangoDB Inc.
 *      driver</a>
 */
public class ArangoDB3Client extends DB {

  private static Logger logger = LoggerFactory.getLogger(ArangoDB3Client.class);
  
  /**
   * Count the number of times initialized to teardown on the last
   * {@link #cleanup()}.
   */
  private static final AtomicInteger INIT_COUNT = new AtomicInteger(0);

  /** ArangoDB Driver related, Singleton. */
  private ArangoDB arangoDB;
  private String databaseName = "ycsb";
  private String collectionName;
  private Boolean dropDBBeforeRun;
  private Boolean waitForSync = false;
  private Boolean transactionUpdate = false;

  /**
   * Initialize any state for this DB. Called once per DB instance; there is
   * one DB instance per client thread.
   * 
   * Actually, one client process will share one DB instance here.(Coincide to
   * mongoDB driver)
   */
  @Override
  public void init() throws DBException {
    synchronized (ArangoDB3Client.class) {
      Properties props = getProperties();

      collectionName = props.getProperty("table", "usertable");

      // Set the DB address
      String ip = props.getProperty("arangodb.ip", "localhost");
      String portStr = props.getProperty("arangodb.port", "8529");
      int port = Integer.parseInt(portStr);

      // If clear db before run
      String dropDBBeforeRunStr = props.getProperty("arangodb.dropDBBeforeRun", "false");
      dropDBBeforeRun = Boolean.parseBoolean(dropDBBeforeRunStr);
      
      // Set the sync mode
      String waitForSyncStr = props.getProperty("arangodb.waitForSync", "false");
      waitForSync = Boolean.parseBoolean(waitForSyncStr);
      
      // Set if transaction for update
      String transactionUpdateStr = props.getProperty("arangodb.transactionUpdate", "false");
      transactionUpdate = Boolean.parseBoolean(transactionUpdateStr);
      
      // Init ArangoDB connection
      try {
        arangoDB = new ArangoDB.Builder().host(ip).port(port).build();
      } catch (Exception e) {
        logger.error("Failed to initialize ArangoDB", e);
        System.exit(-1);
      }

      if(INIT_COUNT.getAndIncrement() == 0) {
        // Init the database
        if (dropDBBeforeRun) {
          // Try delete first
          try {
            arangoDB.db(databaseName).drop();
          } catch (ArangoDBException e) {
            logger.info("Fail to delete DB: {}", databaseName);
          }
        }
        try {
          arangoDB.createDatabase(databaseName);
          logger.info("Database created: " + databaseName);
        } catch (ArangoDBException e) {
          logger.error("Failed to create database: {} with ex: {}", databaseName, e.toString());
        }
        try {
          arangoDB.db(databaseName).createCollection(collectionName);
          logger.info("Collection created: " + collectionName);
        } catch (ArangoDBException e) {
          logger.error("Failed to create collection: {} with ex: {}", collectionName, e.toString());
        }
        logger.info("ArangoDB client connection created to {}:{}", ip, port);

        // Log the configuration
        logger.info("Arango Configuration: dropDBBeforeRun: {}; address: {}:{}; databaseName: {};"
                    + " waitForSync: {}; transactionUpdate: {};",
                    dropDBBeforeRun, ip, port, databaseName, waitForSync, transactionUpdate);
      }
    }
  }

  /**
   * Cleanup any state for this DB. Called once per DB instance; there is one
   * DB instance per client thread.
   * 
   * Actually, one client process will share one DB instance here.(Coincide to
   * mongoDB driver)
   */
  @Override
  public void cleanup() throws DBException {
    if (INIT_COUNT.decrementAndGet() == 0) {
      arangoDB.shutdown();
      arangoDB = null;
      logger.info("Local cleaned up.");
    }
  }

  /**
   * Insert a record in the database. Any field/value pairs in the specified
   * values HashMap will be written into the record with the specified record
   * key.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to insert.
   * @param values
   *      A HashMap of field/value pairs to insert in the record
   * @return Zero on success, a non-zero error code on error. See the
   *     {@link DB} class's description for a discussion of error codes.
   */
  @Override
  public Status insert(String table, String key, Map<String, ByteIterator> values) {
    try {
      BaseDocument toInsert = new BaseDocument(key);
      for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
        toInsert.addAttribute(entry.getKey(), byteIteratorToString(entry.getValue()));
      }
      DocumentCreateOptions options = new DocumentCreateOptions().waitForSync(waitForSync);
      arangoDB.db(databaseName).collection(table).insertDocument(toInsert, options);
      return Status.OK;
    } catch (ArangoDBException e) {
      logger.error("Exception while trying insert {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Read a record from the database. Each field/value pair from the result
   * will be stored in a HashMap.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to read.
   * @param fields
   *      The list of fields to read, or null for all of them
   * @param result
   *      A HashMap of field/value pairs for the result
   * @return Zero on success, a non-zero error code on error or "not found".
   */
  @Override
  public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) {
    try {
      VPackSlice document = arangoDB.db(databaseName).collection(table).getDocument(key, VPackSlice.class, null);
      if (!this.fillMap(result, document, fields)) {
        return Status.ERROR;
      }
      return Status.OK;
    } catch (ArangoDBException e) {
      logger.error("Exception while trying read {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Update a record in the database. Any field/value pairs in the specified
   * values HashMap will be written into the record with the specified record
   * key, overwriting any existing values with the same field name.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to write.
   * @param values
   *      A HashMap of field/value pairs to update in the record
   * @return Zero on success, a non-zero error code on error. See this class's
   *     description for a discussion of error codes.
   */
  @Override
  public Status update(String table, String key, Map<String, ByteIterator> values) {
    try {
      if (!transactionUpdate) {
        BaseDocument updateDoc = new BaseDocument();
        for (Entry<String, ByteIterator> field : values.entrySet()) {
          updateDoc.addAttribute(field.getKey(), byteIteratorToString(field.getValue()));
        }
        arangoDB.db(databaseName).collection(table).updateDocument(key, updateDoc);
        return Status.OK;
      } else {
        // id for documentHandle
        String transactionAction = "function (id) {"
               // use internal database functions
            + "var db = require('internal').db;"
              // collection.update(document, data, overwrite, keepNull, waitForSync)
            + String.format("db._update(id, %s, true, false, %s);}",
                mapToJson(values), Boolean.toString(waitForSync).toLowerCase());
        TransactionOptions options = new TransactionOptions();
        options.writeCollections(table);
        options.params(createDocumentHandle(table, key));
        arangoDB.db(databaseName).transaction(transactionAction, Void.class, options);
        return Status.OK;
      }
    } catch (ArangoDBException e) {
      logger.error("Exception while trying update {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Delete a record from the database.
   * 
   * @param table
   *      The name of the table
   * @param key
   *      The record key of the record to delete.
   * @return Zero on success, a non-zero error code on error. See the
   *     {@link DB} class's description for a discussion of error codes.
   */
  @Override
  public Status delete(String table, String key) {
    try {
      arangoDB.db(databaseName).collection(table).deleteDocument(key);
      return Status.OK;
    } catch (ArangoDBException e) {
      logger.error("Exception while trying delete {} {} with ex {}", table, key, e.toString());
    }
    return Status.ERROR;
  }

  /**
   * Perform a range scan for a set of records in the database. Each
   * field/value pair from the result will be stored in a HashMap.
   * 
   * @param table
   *      The name of the table
   * @param startkey
   *      The record key of the first record to read.
   * @param recordcount
   *      The number of records to read
   * @param fields
   *      The list of fields to read, or null for all of them
   * @param result
   *      A Vector of HashMaps, where each HashMap is a set field/value
   *      pairs for one record
   * @return Zero on success, a non-zero error code on error. See the
   *     {@link DB} class's description for a discussion of error codes.
   */
  @Override
  public Status scan(String table, String startkey, int recordcount, Set<String> fields,
      Vector<HashMap<String, ByteIterator>> result) {
    ArangoCursor<VPackSlice> cursor = null;
    try {
      String aqlQuery = String.format(
          "FOR target IN %s FILTER target._key >= @key SORT target._key ASC LIMIT %d RETURN %s ", table,
          recordcount, constructReturnForAQL(fields, "target"));

      Map<String, Object> bindVars = new MapBuilder().put("key", startkey).get();
      cursor = arangoDB.db(databaseName).query(aqlQuery, bindVars, null, VPackSlice.class);
      while (cursor.hasNext()) {
        VPackSlice aDocument = cursor.next();
        HashMap<String, ByteIterator> aMap = new HashMap<String, ByteIterator>(aDocument.size());
        if (!this.fillMap(aMap, aDocument)) {
          return Status.ERROR;
        }
        result.add(aMap);
      }
      return Status.OK;
    } catch (Exception e) {
      logger.error("Exception while trying scan {} {} {} with ex {}", table, startkey, recordcount, e.toString());
    } finally {
      if (cursor != null) {
        try {
          cursor.close();
        } catch (IOException e) {
          logger.error("Fail to close cursor", e);
        }
      }
    }
    return Status.ERROR;
  }

  private String createDocumentHandle(String collection, String documentKey) throws ArangoDBException {
    validateCollectionName(collection);
    return collection + "/" + documentKey;
  }

  private void validateCollectionName(String name) throws ArangoDBException {
    if (name.indexOf('/') != -1) {
      throw new ArangoDBException("does not allow '/' in name.");
    }
  }

  
  private String constructReturnForAQL(Set<String> fields, String targetName) {
    // Construct the AQL query string.
    String resultDes = targetName;
    if (fields != null && fields.size() != 0) {
      StringBuilder builder = new StringBuilder("{");
      for (String field : fields) {
        builder.append(String.format("\n\"%s\" : %s.%s,", field, targetName, field));
      }
      //Replace last ',' to newline.
      builder.setCharAt(builder.length() - 1, '\n');
      builder.append("}");
      resultDes = builder.toString();
    }
    return resultDes;
  }
  
  private boolean fillMap(Map<String, ByteIterator> resultMap, VPackSlice document) {
    return fillMap(resultMap, document, null);
  }
  
  /**
   * Fills the map with the properties from the BaseDocument.
   * 
   * @param resultMap
   *      The map to fill/
   * @param document
   *      The record to read from
   * @param fields
   *      The list of fields to read, or null for all of them
   * @return isSuccess
   */
  private boolean fillMap(Map<String, ByteIterator> resultMap, VPackSlice document, Set<String> fields) {
    if (fields == null || fields.size() == 0) {
      for (Iterator<Entry<String, VPackSlice>> iterator = document.objectIterator(); iterator.hasNext();) {
        Entry<String, VPackSlice> next = iterator.next();
        VPackSlice value = next.getValue();
        if (value.isString()) {
          resultMap.put(next.getKey(), stringToByteIterator(value.getAsString()));
        } else if (!value.isCustom()) {
          logger.error("Error! Not the format expected! Actually is {}",
              value.getClass().getName());
          return false;
        }
      }
    } else {
      for (String field : fields) {
        VPackSlice value = document.get(field);
        if (value.isString()) {
          resultMap.put(field, stringToByteIterator(value.getAsString()));
        } else if (!value.isCustom()) {
          logger.error("Error! Not the format expected! Actually is {}",
              value.getClass().getName());
          return false;
        }
      }
    }
    return true;
  }
  
  private String byteIteratorToString(ByteIterator byteIter) {
    return new String(byteIter.toArray());
  }

  private ByteIterator stringToByteIterator(String content) {
    return new StringByteIterator(content);
  }
  
  private String mapToJson(Map<String, ByteIterator> values) {
    VPackBuilder builder = new VPackBuilder().add(ValueType.OBJECT);
    for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
      builder.add(entry.getKey(), byteIteratorToString(entry.getValue()));
    }
    builder.close();
    return arangoDB.util().deserialize(builder.slice(), String.class);
  }
  
}


================================================
FILE: arangodb3/src/main/java/com/yahoo/ycsb/db/arangodb/package-info.java
================================================
/**
 * Copyright (c) 2017 YCSB contributors. 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.
 */

/**
 * The YCSB binding for <a href="https://www.arangodb.com/">ArangoDB</a>.
 */
package com.yahoo.ycsb.db.arangodb;



================================================
FILE: asynchbase/README.md
================================================
<!--
Copyright (c) 2016 YCSB contributors. 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.
-->

# AsyncHBase Driver for YCSB

This driver provides a YCSB workload binding for Apache HBase using an alternative to the included HBase client. AsyncHBase is completely asynchronous for all operations and is particularly useful for write heavy workloads. Note that it supports a subset of the HBase client APIs but supports all public released versions of HBase.

## Quickstart

### 1. Setup Hbase

Follow directions 1 to 3 from ``hbase098``'s readme.

### 2. Load a Workload

Switch to the root of the YCSB repo and choose the workload you want to run and `load` it first. With the CLI you must provide the column family at a minimum if HBase is running on localhost. Otherwise you must provide connection properties via CLI or the path to a config file. Additional configuration parameters are available below.

```
bin/ycsb load asynchbase -p columnfamily=cf -P workloads/workloada

```

The `load` step only executes inserts into the datastore. After loading data, run the same workload to mix reads with writes.

```
bin/ycsb run asynchbase -p columnfamily=cf -P workloads/workloada

```

## Configuration Options

The following options can be configured using CLI (using the `-p` parameter) or via a JAVA style properties configuration file.. Check the [AsyncHBase Configuration](http://opentsdb.github.io/asynchbase/docs/build/html/configuration.html) project for additional tuning parameters.

* `columnfamily`: (Required) The column family to target.
* `config`: Optional full path to a configuration file with AsyncHBase options.
* `hbase.zookeeper.quorum`: Zookeeper quorum list.
* `hbase.zookeeper.znode.parent`: Path used by HBase in Zookeeper. Default is "/hbase".
* `debug`: If true, prints debug information to standard out. The default is false.
* `clientbuffering`: Whether or not to use client side buffering and batching of write operations. This can significantly improve performance and defaults to true.
* `durable`: When set to false, writes and deletes bypass the WAL for quicker responses. Default is true.
* `jointimeout`: A timeout value, in milliseconds, for waiting on operations synchronously before an error is thrown.
* `prefetchmeta`: Whether or not to read meta for all regions in the table and connect to the proper region servers before starting operations. Defaults to false.


Note: This module includes some Google Guava source files from version 12 that were later removed but are still required by HBase's test modules for setting up the mini cluster during integration testing.

================================================
FILE: asynchbase/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016 YCSB contributors. 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.ycsb</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.14.0-SNAPSHOT</version>
    <relativePath>../binding-parent/</relativePath>
  </parent>

  <artifactId>asynchbase-binding</artifactId>
  <name>AsyncHBase Client Binding for Apache HBase</name>

  <properties>
    <!-- Tests do not run on jdk9 -->
    <skipJDK9Tests>true</skipJDK9Tests>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.hbase</groupId>
      <artifactId>asynchbase</artifactId>
      <version>${asynchbase.version}</version>
    </dependency>
    
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.zookeeper</groupId>
      <artifactId>zookeeper</artifactId>
      <version>3.4.5</version>
      <exclusions>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
        <exclusion>
          <groupId>jline</groupId>
          <artifactId>jline</artifactId>
        </exclusion>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.netty</groupId>
          <artifactId>netty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-testing-util</artifactId>
      <version>${hbase10.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>jdk.tools</groupId>
          <artifactId>jdk.tools</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-client</artifactId>
      <version>${hbase10.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>jdk.tools</groupId>
          <artifactId>jdk.tools</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>log4j-over-slf4j</artifactId>
      <version>1.7.7</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.20</version>
        <configuration>
          <argLine>-Xms4096m -Xms4096m</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>


================================================
FILE: asynchbase/src/main/java/com/yahoo/ycsb/db/AsyncHBaseClient.java
================================================
/**
 * Copyright (c) 2016 YCSB contributors. 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.
 */
package com.yahoo.ycsb.db;

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.Vector;

import org.hbase.async.Bytes;
import org.hbase.async.Config;
import org.hbase.async.DeleteRequest;
import org.hbase.async.GetRequest;
import org.hbase.async.HBaseClient;
import org.hbase.async.KeyValue;
import org.hbase.async.PutRequest;
import org.hbase.async.Scanner;

import com.yahoo.ycsb.ByteArrayByteIterator;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.Status;

import static com.yahoo.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY;
import static com.yahoo.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY_DEFAULT;

/**
 * Alternative Java client for Apache HBase.
 * 
 * This client provides a subset of the main HBase client and uses a completely
 * asynchronous pipeline for all calls. It is particularly useful for write heavy
 * workloads. It is also compatible with all production versions of HBase. 
 */
public class AsyncHBaseClient extends com.yahoo.ycsb.DB {
  public static final Charset UTF8_CHARSET = Charset.forName("UTF8");
  private static final String CLIENT_SIDE_BUFFERING_PROPERTY = "clientbuffering";
  private static final String DURABILITY_PROPERTY = "durability";
  private static final String PREFETCH_META_PROPERTY = "prefetchmeta";
  private static final String CONFIG_PROPERTY = "config";
  private static final String COLUMN_FAMILY_PROPERTY = "columnfamily";
  private static final String JOIN_TIMEOUT_PROPERTY = "jointimeout";
  private static final String JOIN_TIMEOUT_PROPERTY_DEFAULT = "30000";
  
  /** Mutex for instantiating a single instance of the client. */
  private static final Object MUTEX = new Object();
  
  /** Use for tracking running thread counts so we know when to shutdown the client. */ 
  private static int threadCount = 0;
  
  /** The client that's used for all threads. */
  private static HBaseClient client;
  
  /** Print debug information to standard out. */
  private boolean debug = false;
  
  /** The column family use for the workload. */
  private byte[] columnFamilyBytes;
  
  /** Cache for the last table name/ID to avoid byte conversions. */
  private String lastTable = "";
  private byte[] lastTableBytes;
  
  private long joinTimeout;
  
  /** Whether or not to bypass the WAL for puts and deletes. */
  private boolean durability = true;
  
  /**
   * If true, buffer mutations on the client. This is the default behavior for
   * AsyncHBase. For measuring insert/update/delete latencies, client side
   * buffering should be disabled.
   * 
   * A single instance of this 
   */
  private boolean clientSideBuffering = false;
  
  @Override
  public void init() throws DBException {
    if (getProperties().getProperty(CLIENT_SIDE_BUFFERING_PROPERTY, "false")
        .toLowerCase().equals("true")) {
      clientSideBuffering = true;
    }
    if (getProperties().getProperty(DURABILITY_PROPERTY, "true")
        .toLowerCase().equals("false")) {
      durability = false;
    }
    final String columnFamily = getProperties().getProperty(COLUMN_FAMILY_PROPERTY);
    if (columnFamily == null || columnFamily.isEmpty()) {
      System.err.println("Error, must specify a columnfamily for HBase table");
      throw new DBException("No columnfamily specified");
    }
    columnFamilyBytes = columnFamily.getBytes();
    
    if ((getProperties().getProperty("debug") != null)
        && (getProperties().getProperty("debug").compareTo("true") == 0)) {
      debug = true;
    }
    
    joinTimeout = Integer.parseInt(getProperties().getProperty(
        JOIN_TIMEOUT_PROPERTY, JOIN_TIMEOUT_PROPERTY_DEFAULT));
    
    final boolean prefetchMeta = getProperties()
        .getProperty(PREFETCH_META_PROPERTY, "false")
        .toLowerCase().equals("true") ? true : false;
    try {
      synchronized (MUTEX) {
        ++threadCount;
        if (client == null) {
          final String configPath = getProperties().getProperty(CONFIG_PROPERTY);
          final Config config;
          if (configPath == null || configPath.isEmpty()) {
            config = new Config();
            final Iterator<Entry<Object, Object>> iterator = getProperties()
                 .entrySet().iterator();
            while (iterator.hasNext()) {
              final Entry<Object, Object> property = iterator.next();
              config.overrideConfig((String)property.getKey(), 
                  (String)property.getValue());
            }
          } else {
            config = new Config(configPath);
          }
          client = new HBaseClient(config);
          
          // Terminate right now if table does not exist, since the client
          // will not propagate this error upstream once the workload
          // starts.
          
Download .txt
gitextract_7z7eehwx/

├── .editorconfig
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE.txt
├── NOTICE.txt
├── README.md
├── Todo.md
├── accumulo1.6/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   └── accumulo.properties
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── accumulo/
│       │                           ├── AccumuloClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── accumulo/
│           │                       └── AccumuloTest.java
│           └── resources/
│               └── log4j.properties
├── accumulo1.7/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   └── accumulo.properties
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── accumulo/
│       │                           ├── AccumuloClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── accumulo/
│           │                       └── AccumuloTest.java
│           └── resources/
│               └── log4j.properties
├── accumulo1.8/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   └── accumulo.properties
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── accumulo/
│       │                           ├── AccumuloClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── accumulo/
│           │                       └── AccumuloTest.java
│           └── resources/
│               └── log4j.properties
├── aerospike/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── AerospikeClient.java
│                               └── package-info.java
├── arangodb/
│   ├── .gitignore
│   ├── README.md
│   ├── conf/
│   │   └── logback.xml
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── ArangoDBClient.java
│                               └── package-info.java
├── arangodb3/
│   ├── .gitignore
│   ├── README.md
│   ├── conf/
│   │   └── logback.xml
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── arangodb/
│                                   ├── ArangoDB3Client.java
│                                   └── package-info.java
├── asynchbase/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── AsyncHBaseClient.java
│       │                       └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       ├── google/
│           │       │   └── common/
│           │       │       ├── base/
│           │       │       │   └── Stopwatch.java
│           │       │       └── io/
│           │       │           ├── Closeables.java
│           │       │           └── LimitInputStream.java
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── AsyncHBaseTest.java
│           └── resources/
│               ├── hbase-site.xml
│               └── log4j.properties
├── azuredocumentdb/
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── azuredocumentdb/
│                                   ├── AzureDocumentDBClient.java
│                                   └── package-info.java
├── azuretablestorage/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── azuretablestorage/
│                                   ├── AzureClient.java
│                                   └── package-info.java
├── bin/
│   ├── bindings.properties
│   ├── ycsb
│   ├── ycsb.bat
│   └── ycsb.sh
├── binding-parent/
│   ├── datastore-specific-descriptor/
│   │   ├── pom.xml
│   │   └── src/
│   │       └── main/
│   │           └── resources/
│   │               └── assemblies/
│   │                   └── datastore-specific-assembly.xml
│   └── pom.xml
├── cassandra/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── CassandraCQLClient.java
│       │                       └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── CassandraCQLClientTest.java
│           └── resources/
│               └── ycsb.cql
├── checkstyle.xml
├── cloudspanner/
│   ├── README.md
│   ├── conf/
│   │   └── cloudspanner.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── cloudspanner/
│                                   ├── CloudSpannerClient.java
│                                   └── package-info.java
├── core/
│   ├── CHANGES.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               ├── BasicDB.java
│       │   │               ├── BasicTSDB.java
│       │   │               ├── ByteArrayByteIterator.java
│       │   │               ├── ByteIterator.java
│       │   │               ├── Client.java
│       │   │               ├── CommandLine.java
│       │   │               ├── DB.java
│       │   │               ├── DBException.java
│       │   │               ├── DBFactory.java
│       │   │               ├── DBWrapper.java
│       │   │               ├── GoodBadUglyDB.java
│       │   │               ├── InputStreamByteIterator.java
│       │   │               ├── NumericByteIterator.java
│       │   │               ├── RandomByteIterator.java
│       │   │               ├── Status.java
│       │   │               ├── StringByteIterator.java
│       │   │               ├── TerminatorThread.java
│       │   │               ├── UnknownDBException.java
│       │   │               ├── Utils.java
│       │   │               ├── Workload.java
│       │   │               ├── WorkloadException.java
│       │   │               ├── generator/
│       │   │               │   ├── AcknowledgedCounterGenerator.java
│       │   │               │   ├── ConstantIntegerGenerator.java
│       │   │               │   ├── CounterGenerator.java
│       │   │               │   ├── DiscreteGenerator.java
│       │   │               │   ├── ExponentialGenerator.java
│       │   │               │   ├── FileGenerator.java
│       │   │               │   ├── Generator.java
│       │   │               │   ├── HistogramGenerator.java
│       │   │               │   ├── HotspotIntegerGenerator.java
│       │   │               │   ├── IncrementingPrintableStringGenerator.java
│       │   │               │   ├── NumberGenerator.java
│       │   │               │   ├── RandomDiscreteTimestampGenerator.java
│       │   │               │   ├── ScrambledZipfianGenerator.java
│       │   │               │   ├── SequentialGenerator.java
│       │   │               │   ├── SkewedLatestGenerator.java
│       │   │               │   ├── UniformGenerator.java
│       │   │               │   ├── UniformLongGenerator.java
│       │   │               │   ├── UnixEpochTimestampGenerator.java
│       │   │               │   ├── ZipfianGenerator.java
│       │   │               │   └── package-info.java
│       │   │               ├── measurements/
│       │   │               │   ├── Measurements.java
│       │   │               │   ├── OneMeasurement.java
│       │   │               │   ├── OneMeasurementHdrHistogram.java
│       │   │               │   ├── OneMeasurementHistogram.java
│       │   │               │   ├── OneMeasurementRaw.java
│       │   │               │   ├── OneMeasurementTimeSeries.java
│       │   │               │   ├── TwoInOneMeasurement.java
│       │   │               │   ├── exporter/
│       │   │               │   │   ├── JSONArrayMeasurementsExporter.java
│       │   │               │   │   ├── JSONMeasurementsExporter.java
│       │   │               │   │   ├── MeasurementsExporter.java
│       │   │               │   │   ├── TextMeasurementsExporter.java
│       │   │               │   │   └── package-info.java
│       │   │               │   └── package-info.java
│       │   │               ├── package-info.java
│       │   │               └── workloads/
│       │   │                   ├── ConstantOccupancyWorkload.java
│       │   │                   ├── CoreWorkload.java
│       │   │                   ├── RestWorkload.java
│       │   │                   ├── TimeSeriesWorkload.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       └── project.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           ├── TestByteIterator.java
│                           ├── TestNumericByteIterator.java
│                           ├── TestStatus.java
│                           ├── TestUtils.java
│                           ├── generator/
│                           │   ├── AcknowledgedCounterGeneratorTest.java
│                           │   ├── TestIncrementingPrintableStringGenerator.java
│                           │   ├── TestRandomDiscreteTimestampGenerator.java
│                           │   ├── TestUnixEpochTimestampGenerator.java
│                           │   └── TestZipfianGenerator.java
│                           ├── measurements/
│                           │   └── exporter/
│                           │       └── TestMeasurementsExporter.java
│                           └── workloads/
│                               ├── TestCoreWorkload.java
│                               └── TestTimeSeriesWorkload.java
├── couchbase/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── CouchbaseClient.java
│                               └── package-info.java
├── couchbase2/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── couchbase2/
│                                   ├── Couchbase2Client.java
│                                   └── package-info.java
├── distribution/
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── assembly/
│               └── distribution.xml
├── doc/
│   ├── coreproperties.html
│   ├── coreworkloads.html
│   ├── dblayer.html
│   ├── index.html
│   ├── parallelclients.html
│   ├── tipsfaq.html
│   └── workload.html
├── dynamodb/
│   ├── README.md
│   ├── conf/
│   │   ├── AWSCredentials.properties
│   │   └── dynamodb.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── DynamoDBClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── log4j.properties
├── elasticsearch/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── ElasticsearchClient.java
│       │                       └── package-info.java
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── ElasticsearchClientTest.java
├── elasticsearch5/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── elasticsearch5/
│       │   │                       ├── Elasticsearch5.java
│       │   │                       ├── ElasticsearchClient.java
│       │   │                       ├── ElasticsearchRestClient.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── log4j2.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── elasticsearch5/
│                                   ├── ElasticsearchClientIT.java
│                                   ├── ElasticsearchIntegTestBase.java
│                                   └── ElasticsearchRestClientIT.java
├── geode/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── GeodeClient.java
│                               └── package-info.java
├── googlebigtable/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── GoogleBigtableClient.java
│                               └── package-info.java
├── googledatastore/
│   ├── README.md
│   ├── conf/
│   │   └── googledatastore.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── GoogleDatastoreClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── log4j.properties
├── hbase098/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── HBaseClient.java
│                               └── package-info.java
├── hbase10/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── HBaseClient10.java
│       │                       └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── HBaseClient10Test.java
│           └── resources/
│               ├── hbase-site.xml
│               └── log4j.properties
├── hbase12/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       └── hbase12/
│       │                           ├── HBaseClient12.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── hbase12/
│           │                       └── HBaseClient12Test.java
│           └── resources/
│               ├── hbase-site.xml
│               └── log4j.properties
├── hypertable/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── HypertableClient.java
│                               └── package-info.java
├── infinispan/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── infinispan-config.xml
│           │   └── remote-cache.properties
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── InfinispanClient.java
│                               ├── InfinispanRemoteClient.java
│                               ├── RemoteCacheManagerHolder.java
│                               └── package-info.java
├── jdbc/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── conf/
│       │   │   ├── db.properties
│       │   │   └── h2.properties
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   ├── JdbcDBCli.java
│       │   │                   ├── JdbcDBClient.java
│       │   │                   ├── JdbcDBCreateTable.java
│       │   │                   ├── StatementType.java
│       │   │                   ├── flavors/
│       │   │                   │   ├── DBFlavor.java
│       │   │                   │   ├── DefaultDBFlavor.java
│       │   │                   │   ├── PhoenixDBFlavor.java
│       │   │                   │   └── package-info.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       └── sql/
│       │           ├── README.md
│       │           ├── create_table.mysql
│       │           └── create_table.sql
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── JdbcDBClientTest.java
├── kudu/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   └── log4j.properties
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── KuduYCSBClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── log4j.properties
├── leveldb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── LevelDbClient.java
├── leveldbjni/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── LevelDbJniClient.java
├── mapkeeper/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── MapKeeperClient.java
├── memcached/
│   ├── README.md
│   ├── conf/
│   │   └── memcached.properties
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── MemcachedClient.java
│                               └── package-info.java
├── mongodb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   ├── AsyncMongoDbClient.java
│       │   │                   ├── MongoDbClient.java
│       │   │                   ├── OptionsSupport.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       ├── log4j.properties
│       │       └── logback.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── AbstractDBTestCases.java
│                               ├── AsyncMongoDbClientTest.java
│                               ├── MongoDbClientTest.java
│                               └── OptionsSupportTest.java
├── nosqldb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── nosqldb.properties
│           │   └── script.txt
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── NoSqlDbClient.java
│                               └── package-info.java
├── orientdb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   ├── OrientDBClient.java
│       │   │                   └── package-info.java
│       │   └── resources/
│       │       └── log4j.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── OrientDBClientTest.java
├── pom.xml
├── rados/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── db/
│       │                       ├── RadosClient.java
│       │                       └── package-info.java
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── RadosClientTest.java
├── redis/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── RedisClient.java
│                               └── package-info.java
├── rest/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── com/
│       │           └── yahoo/
│       │               └── ycsb/
│       │                   └── webservice/
│       │                       └── rest/
│       │                           ├── RestClient.java
│       │                           └── package-info.java
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── webservice/
│           │                   └── rest/
│           │                       ├── IntegrationTest.java
│           │                       ├── ResourceLoader.java
│           │                       ├── RestClientTest.java
│           │                       ├── RestTestResource.java
│           │                       └── Utils.java
│           └── resources/
│               ├── WebContent/
│               │   └── index.html
│               ├── error_trace.txt
│               ├── trace.txt
│               └── workload_rest
├── riak/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── riak/
│       │   │                       ├── RiakKVClient.java
│       │   │                       ├── RiakUtils.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── riak.properties
│       └── test/
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               └── riak/
│                                   └── RiakKVClientTest.java
├── rocksdb/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── RocksdbClient.java
├── s3/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   └── s3.properties
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── S3Client.java
│                               └── package-info.java
├── solr/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── solr/
│       │   │                       ├── SolrClient.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── log4j.properties
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── solr/
│           │                       ├── SolrClientBaseTest.java
│           │                       ├── SolrClientCloudTest.java
│           │                       └── SolrClientTest.java
│           └── resources/
│               ├── log4j.properties
│               └── solr_config/
│                   ├── schema.xml
│                   └── solrconfig.xml
├── solr6/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── yahoo/
│       │   │           └── ycsb/
│       │   │               └── db/
│       │   │                   └── solr6/
│       │   │                       ├── SolrClient.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       └── log4j.properties
│       └── test/
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   └── solr6/
│           │                       ├── SolrClientBaseTest.java
│           │                       ├── SolrClientCloudTest.java
│           │                       └── SolrClientTest.java
│           └── resources/
│               ├── log4j.properties
│               └── solr_config/
│                   ├── schema.xml
│                   └── solrconfig.xml
├── tarantool/
│   ├── README.md
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── tarantool-hash.lua
│           │   └── tarantool-tree.lua
│           └── java/
│               └── com/
│                   └── yahoo/
│                       └── ycsb/
│                           └── db/
│                               ├── TarantoolClient.java
│                               └── package-info.java
├── voldemort/
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── conf/
│           │   ├── cluster.xml
│           │   ├── server.properties
│           │   └── stores.xml
│           ├── java/
│           │   └── com/
│           │       └── yahoo/
│           │           └── ycsb/
│           │               └── db/
│           │                   ├── VoldemortClient.java
│           │                   └── package-info.java
│           └── resources/
│               └── config/
│                   ├── cluster.xml
│                   ├── server.properties
│                   └── stores.xml
└── workloads/
    ├── tsworkload_template
    ├── tsworkloada
    ├── workload_template
    ├── workloada
    ├── workloadb
    ├── workloadc
    ├── workloadd
    ├── workloade
    └── workloadf
Download .txt
SYMBOL INDEX (1430 symbols across 157 files)

FILE: accumulo1.6/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java
  class AccumuloClient (line 64) | public class AccumuloClient extends DB {
    method run (line 74) | @Override
    method init (line 81) | @Override
    method cleanup (line 104) | @Override
    method getWriter (line 125) | public BatchWriter getWriter(String table) throws TableNotFoundExcepti...
    method createBatchWriter (line 156) | private BatchWriter createBatchWriter(String table) throws TableNotFou...
    method getRow (line 182) | private Scanner getRow(String table, Text row, Set<String> fields) thr...
    method read (line 193) | @Override
    method scan (line 222) | @Override
    method update (line 281) | @Override
    method insert (line 309) | @Override
    method delete (line 315) | @Override
    method deleteRow (line 342) | private void deleteRow(String table, Text row, BatchWriter bw) throws ...
    method deleteRow (line 351) | private void deleteRow(Scanner scanner, BatchWriter bw) throws Mutatio...

FILE: accumulo1.6/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java
  class AccumuloTest (line 58) | public class AccumuloTest {
    method isWindows (line 74) | private static boolean isWindows() {
    method setup (line 79) | @BeforeClass
    method clusterCleanup (line 110) | @AfterClass
    method client (line 119) | @Before
    method cleanup (line 142) | @After
    method truncateTable (line 155) | @After
    method workloada (line 164) | @Test
    method workloadb (line 169) | @Test
    method workloadc (line 174) | @Test
    method workloadd (line 179) | @Test
    method workloade (line 184) | @Test
    method runWorkload (line 197) | private void runWorkload() throws Exception {

FILE: accumulo1.7/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java
  class AccumuloClient (line 65) | public class AccumuloClient extends DB {
    method run (line 75) | @Override
    method init (line 82) | @Override
    method cleanup (line 105) | @Override
    method getWriter (line 126) | public BatchWriter getWriter(String table) throws TableNotFoundExcepti...
    method createBatchWriter (line 157) | private BatchWriter createBatchWriter(String table) throws TableNotFou...
    method getRow (line 183) | private Scanner getRow(String table, Text row, Set<String> fields) thr...
    method read (line 194) | @Override
    method scan (line 223) | @Override
    method update (line 282) | @Override
    method insert (line 310) | @Override
    method delete (line 316) | @Override
    method deleteRow (line 343) | private void deleteRow(String table, Text row, BatchWriter bw) throws ...
    method deleteRow (line 352) | private void deleteRow(Scanner scanner, BatchWriter bw) throws Mutatio...

FILE: accumulo1.7/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java
  class AccumuloTest (line 58) | public class AccumuloTest {
    method isWindows (line 74) | private static boolean isWindows() {
    method setup (line 79) | @BeforeClass
    method clusterCleanup (line 110) | @AfterClass
    method client (line 119) | @Before
    method cleanup (line 142) | @After
    method truncateTable (line 155) | @After
    method workloada (line 164) | @Test
    method workloadb (line 169) | @Test
    method workloadc (line 174) | @Test
    method workloadd (line 179) | @Test
    method workloade (line 184) | @Test
    method runWorkload (line 197) | private void runWorkload() throws Exception {

FILE: accumulo1.8/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java
  class AccumuloClient (line 65) | public class AccumuloClient extends DB {
    method run (line 75) | @Override
    method init (line 82) | @Override
    method cleanup (line 105) | @Override
    method getWriter (line 126) | public BatchWriter getWriter(String table) throws TableNotFoundExcepti...
    method createBatchWriter (line 157) | private BatchWriter createBatchWriter(String table) throws TableNotFou...
    method getRow (line 183) | private Scanner getRow(String table, Text row, Set<String> fields) thr...
    method read (line 194) | @Override
    method scan (line 223) | @Override
    method update (line 282) | @Override
    method insert (line 310) | @Override
    method delete (line 316) | @Override
    method deleteRow (line 343) | private void deleteRow(String table, Text row, BatchWriter bw) throws ...
    method deleteRow (line 352) | private void deleteRow(Scanner scanner, BatchWriter bw) throws Mutatio...

FILE: accumulo1.8/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java
  class AccumuloTest (line 58) | public class AccumuloTest {
    method isWindows (line 74) | private static boolean isWindows() {
    method setup (line 79) | @BeforeClass
    method clusterCleanup (line 110) | @AfterClass
    method client (line 119) | @Before
    method cleanup (line 142) | @After
    method truncateTable (line 155) | @After
    method workloada (line 164) | @Test
    method workloadb (line 169) | @Test
    method workloadc (line 174) | @Test
    method workloadd (line 179) | @Test
    method workloade (line 184) | @Test
    method runWorkload (line 197) | private void runWorkload() throws Exception {

FILE: aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java
  class AerospikeClient (line 42) | public class AerospikeClient extends com.yahoo.ycsb.DB {
    method init (line 57) | @Override
    method cleanup (line 94) | @Override
    method read (line 99) | @Override
    method scan (line 129) | @Override
    method write (line 136) | private Status write(String table, String key, WritePolicy writePolicy,
    method update (line 157) | @Override
    method insert (line 163) | @Override
    method delete (line 169) | @Override

FILE: arangodb/src/main/java/com/yahoo/ycsb/db/ArangoDBClient.java
  class ArangoDBClient (line 58) | public class ArangoDBClient extends DB {
    method init (line 86) | @Override
    method cleanup (line 167) | @Override
    method insert (line 189) | @Override
    method read (line 226) | @SuppressWarnings("unchecked")
    method update (line 263) | @Override
    method delete (line 311) | @Override
    method scan (line 347) | @Override
    method createDocumentHandle (line 382) | private String createDocumentHandle(String collectionName, String docu...
    method validateCollectionName (line 387) | private void validateCollectionName(String name) throws ArangoException {
    method constructReturnForAQL (line 394) | private String constructReturnForAQL(Set<String> fields, String target...
    method fillMap (line 410) | private boolean fillMap(Map<String, ByteIterator> resultMap, Map<Strin...
    method fillMap (line 423) | @SuppressWarnings("unchecked")
    method byteIteratorToString (line 450) | private String byteIteratorToString(ByteIterator byteIter) {
    method stringToByteIterator (line 454) | private ByteIterator stringToByteIterator(String content) {
    method mapToJson (line 458) | private String mapToJson(Map<String, ByteIterator> values) {

FILE: arangodb3/src/main/java/com/yahoo/ycsb/db/arangodb/ArangoDB3Client.java
  class ArangoDB3Client (line 58) | public class ArangoDB3Client extends DB {
    method init (line 83) | @Override
    method cleanup (line 154) | @Override
    method insert (line 177) | @Override
    method read (line 207) | @Override
    method update (line 235) | @Override
    method delete (line 275) | @Override
    method scan (line 304) | @Override
    method createDocumentHandle (line 338) | private String createDocumentHandle(String collection, String document...
    method validateCollectionName (line 343) | private void validateCollectionName(String name) throws ArangoDBExcept...
    method constructReturnForAQL (line 350) | private String constructReturnForAQL(Set<String> fields, String target...
    method fillMap (line 366) | private boolean fillMap(Map<String, ByteIterator> resultMap, VPackSlic...
    method fillMap (line 381) | private boolean fillMap(Map<String, ByteIterator> resultMap, VPackSlic...
    method byteIteratorToString (line 409) | private String byteIteratorToString(ByteIterator byteIter) {
    method stringToByteIterator (line 413) | private ByteIterator stringToByteIterator(String content) {
    method mapToJson (line 417) | private String mapToJson(Map<String, ByteIterator> values) {

FILE: asynchbase/src/main/java/com/yahoo/ycsb/db/AsyncHBaseClient.java
  class AsyncHBaseClient (line 53) | public class AsyncHBaseClient extends com.yahoo.ycsb.DB {
    method init (line 96) | @Override
    method cleanup (line 179) | @Override
    method read (line 198) | @Override
    method scan (line 247) | @Override
    method update (line 301) | @Override
    method insert (line 349) | @Override
    method delete (line 355) | @Override
    method setTable (line 393) | private void setTable(final String table) {
    method getQualifierList (line 405) | private byte[][] getQualifierList(final Set<String> fields) {

FILE: asynchbase/src/test/java/com/google/common/base/Stopwatch.java
  class Stopwatch (line 71) | @Beta
    method createUnstarted (line 85) | public static Stopwatch createUnstarted() {
    method createUnstarted (line 95) | public static Stopwatch createUnstarted(Ticker ticker) {
    method createStarted (line 105) | public static Stopwatch createStarted() {
    method createStarted (line 115) | public static Stopwatch createStarted(Ticker ticker) {
    method Stopwatch (line 125) | @Deprecated
    method Stopwatch (line 136) | @Deprecated
    method isRunning (line 146) | public boolean isRunning() {
    method start (line 156) | public Stopwatch start() {
    method stop (line 170) | public Stopwatch stop() {
    method reset (line 184) | public Stopwatch reset() {
    method elapsedNanos (line 190) | private long elapsedNanos() {
    method elapsed (line 204) | public long elapsed(TimeUnit desiredUnit) {
    method elapsedTime (line 219) | @Deprecated
    method elapsedMillis (line 232) | @Deprecated
    method toString (line 240) | @GwtIncompatible("String.format()")
    method chooseUnit (line 251) | private static TimeUnit chooseUnit(long nanos) {
    method abbreviate (line 264) | private static String abbreviate(TimeUnit unit) {

FILE: asynchbase/src/test/java/com/google/common/io/Closeables.java
  class Closeables (line 35) | @Beta
    method Closeables (line 40) | private Closeables() {}
    method close (line 74) | public static void close(@Nullable Closeable closeable,
    method closeQuietly (line 97) | public static void closeQuietly(@Nullable Closeable closeable) {

FILE: asynchbase/src/test/java/com/google/common/io/LimitInputStream.java
  class LimitInputStream (line 32) | @Beta
    method LimitInputStream (line 44) | public LimitInputStream(InputStream in, long limit) {
    method available (line 51) | @Override public int available() throws IOException {
    method mark (line 55) | @Override public synchronized void mark(int readlimit) {
    method read (line 61) | @Override public int read() throws IOException {
    method read (line 73) | @Override public int read(byte[] b, int off, int len) throws IOExcepti...
    method reset (line 86) | @Override public synchronized void reset() throws IOException {
    method skip (line 98) | @Override public long skip(long n) throws IOException {

FILE: asynchbase/src/test/java/com/yahoo/ycsb/db/AsyncHBaseTest.java
  class AsyncHBaseTest (line 58) | public class AsyncHBaseTest {
    method isWindows (line 67) | private static boolean isWindows() {
    method setUpClass (line 77) | @BeforeClass
    method tearDownClass (line 89) | @AfterClass
    method setUp (line 101) | @Before
    method tearDown (line 120) | @After
    method testRead (line 126) | @Test
    method testReadMissingRow (line 144) | @Test
    method testScan (line 152) | @Test
    method testUpdate (line 187) | @Test
    method testDelete (line 208) | @Test

FILE: azuredocumentdb/src/main/java/com/yahoo/ycsb/db/azuredocumentdb/AzureDocumentDBClient.java
  class AzureDocumentDBClient (line 35) | public class AzureDocumentDBClient extends DB {
    method init (line 44) | @Override
    method read (line 76) | @Override
    method update (line 97) | @Override
    method insert (line 122) | @Override
    method delete (line 143) | @Override
    method scan (line 158) | @Override
    method getDatabase (line 166) | private Database getDatabase() {
    method getCollection (line 200) | private DocumentCollection getCollection(String collectionId)
    method getDocumentById (line 240) | private Document getDocumentById(String collectionId, String id) {

FILE: azuretablestorage/src/main/java/com/yahoo/ycsb/db/azuretablestorage/AzureClient.java
  class AzureClient (line 49) | public class AzureClient extends DB {
    method init (line 71) | @Override
    method cleanup (line 103) | @Override
    method read (line 107) | @Override
    method scan (line 117) | @Override
    method update (line 148) | @Override
    method insert (line 153) | @Override
    method delete (line 162) | @Override
    method getStorageConnectionString (line 178) | private String getStorageConnectionString(String protocol, String acco...
    method readSubset (line 191) | public Status readSubset(String key, Set<String> fields, Map<String, B...
    method readEntity (line 224) | private Status readEntity(String key, Map<String, ByteIterator> result) {
    method insertBatch (line 242) | private Status insertBatch(String key, Map<String, ByteIterator> value...
    method insertOrUpdate (line 263) | private Status insertOrUpdate(String key, Map<String, ByteIterator> va...

FILE: cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java
  class CassandraCQLClient (line 54) | public class CassandraCQLClient extends DB {
    method init (line 105) | @Override
    method cleanup (line 208) | @Override
    method read (line 240) | @Override
    method scan (line 316) | @Override
    method update (line 403) | @Override
    method insert (line 423) | @Override
    method delete (line 470) | @Override

FILE: cassandra/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java
  class CassandraCQLClientTest (line 56) | public class CassandraCQLClientTest {
    method setUp (line 72) | @Before
    method tearDownClient (line 89) | @After
    method clearTable (line 97) | @After
    method testReadMissingRow (line 106) | @Test
    method insertRow (line 114) | private void insertRow() {
    method testRead (line 124) | @Test
    method testReadSingleColumn (line 145) | @Test
    method testUpdate (line 157) | @Test

FILE: cloudspanner/src/main/java/com/yahoo/ycsb/db/cloudspanner/CloudSpannerClient.java
  class CloudSpannerClient (line 57) | public class CloudSpannerClient extends DB {
    class CloudSpannerProperties (line 62) | public static final class CloudSpannerProperties {
      method CloudSpannerProperties (line 63) | private CloudSpannerProperties() {}
    method constructStandardQueriesAndFields (line 136) | private static void constructStandardQueriesAndFields(Properties prope...
    method getSpanner (line 147) | private static Spanner getSpanner(Properties properties, String host, ...
    method init (line 178) | @Override
    method readUsingQuery (line 224) | private Status readUsingQuery(
    method read (line 254) | @Override
    method scanUsingQuery (line 271) | private Status scanUsingQuery(
    method scan (line 302) | @Override
    method update (line 326) | @Override
    method insert (line 342) | @Override
    method cleanup (line 368) | @Override
    method delete (line 380) | @Override
    method decodeStruct (line 391) | private static void decodeStruct(

FILE: core/src/main/java/com/yahoo/ycsb/BasicDB.java
  class BasicDB (line 29) | public class BasicDB extends DB {
    method BasicDB (line 55) | public BasicDB() {
    method delay (line 59) | protected void delay() {
    method init (line 82) | public void init() {
    method initialValue (line 114) | @Override
    method getStringBuilder (line 120) | protected static StringBuilder getStringBuilder() {
    method read (line 135) | public Status read(String table, String key, Set<String> fields, Map<S...
    method scan (line 171) | public Status scan(String table, String startkey, int recordcount, Set...
    method update (line 206) | public Status update(String table, String key, Map<String, ByteIterato...
    method insert (line 237) | public Status insert(String table, String key, Map<String, ByteIterato...
    method delete (line 268) | public Status delete(String table, String key) {
    method cleanup (line 284) | @Override
    method incCounter (line 305) | protected void incCounter(final Map<Integer, Integer> map, final int h...
    method hash (line 326) | protected int hash(final String table, final String key, final Set<Str...
    method hash (line 349) | protected int hash(final String table, final String key, final Map<Str...

FILE: core/src/main/java/com/yahoo/ycsb/BasicTSDB.java
  class BasicTSDB (line 32) | public class BasicTSDB extends BasicDB {
    method init (line 45) | @Override
    method read (line 71) | public Status read(String table, String key, Set<String> fields, Map<S...
    method update (line 120) | @Override
    method insert (line 173) | @Override
    method cleanup (line 226) | @Override
    method hash (line 249) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/ByteArrayByteIterator.java
  class ByteArrayByteIterator (line 22) | public class ByteArrayByteIterator extends ByteIterator {
    method ByteArrayByteIterator (line 28) | public ByteArrayByteIterator(byte[] s) {
    method ByteArrayByteIterator (line 35) | public ByteArrayByteIterator(byte[] s, int off, int len) {
    method hasNext (line 42) | @Override
    method nextByte (line 47) | @Override
    method bytesLeft (line 54) | @Override
    method reset (line 59) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/ByteIterator.java
  class ByteIterator (line 47) | public abstract class ByteIterator implements Iterator<Byte> {
    method hasNext (line 49) | @Override
    method next (line 52) | @Override
    method nextByte (line 57) | public abstract byte nextByte();
    method nextBuf (line 60) | public int nextBuf(byte[] buf, int bufOff) {
    method bytesLeft (line 69) | public abstract long bytesLeft();
    method remove (line 71) | @Override
    method reset (line 81) | public void reset() {
    method toString (line 86) | public String toString() {
    method toArray (line 93) | public byte[] toArray() {

FILE: core/src/main/java/com/yahoo/ycsb/Client.java
  class StatusThread (line 42) | class StatusThread extends Thread {
    method StatusThread (line 81) | public StatusThread(CountDownLatch completeLatch, List<ClientThread> c...
    method StatusThread (line 97) | public StatusThread(CountDownLatch completeLatch, List<ClientThread> c...
    method run (line 112) | @Override
    method computeStats (line 154) | private long computeStats(final long startTimeMs, long startIntervalMs...
    method waitForClientsUntil (line 204) | private boolean waitForClientsUntil(long deadline) {
    method measureJVM (line 227) | private void measureJVM() {
    method getMaxThreads (line 274) | public int getMaxThreads() {
    method getMinThreads (line 281) | public int getMinThreads() {
    method getMaxUsedMem (line 288) | public long getMaxUsedMem() {
    method getMinUsedMem (line 295) | public long getMinUsedMem() {
    method getMaxLoadAvg (line 302) | public double getMaxLoadAvg() {
    method getMinLoadAvg (line 309) | public double getMinLoadAvg() {
    method trackJVMStats (line 316) | public boolean trackJVMStats() {
  class RemainingFormatter (line 325) | final class RemainingFormatter {
    method RemainingFormatter (line 326) | private RemainingFormatter() {
    method format (line 330) | public static StringBuilder format(long seconds) {
  class ClientThread (line 361) | class ClientThread implements Runnable {
    method ClientThread (line 391) | public ClientThread(DB db, boolean dotransactions, Workload workload, ...
    method setThreadId (line 408) | public void setThreadId(final int threadId) {
    method setThreadCount (line 412) | public void setThreadCount(final int threadCount) {
    method getOpsDone (line 416) | public int getOpsDone() {
    method run (line 420) | @Override
    method sleepUntil (line 493) | private static void sleepUntil(long deadline) {
    method throttleNanos (line 501) | private void throttleNanos(long startTimeNanos) {
    method getOpsTodo (line 514) | int getOpsTodo() {
  class Client (line 523) | public final class Client {
    method Client (line 524) | private Client() {
    method usageMessage (line 616) | public static void usageMessage() {
    method checkRequiredProperties (line 645) | public static boolean checkRequiredProperties(Properties props) {
    method exportMeasurements (line 661) | private static void exportMeasurements(Properties props, int opcount, ...
    method main (line 723) | @SuppressWarnings("unchecked")
    method initDb (line 850) | private static List<ClientThread> initDb(String dbname, Properties pro...
    method getTracer (line 901) | private static Tracer getTracer(Properties props, Workload workload) {
    method initWorkload (line 907) | private static void initWorkload(Properties props, Thread warningthrea...
    method getHTraceConfiguration (line 920) | private static HTraceConfiguration getHTraceConfiguration(Properties p...
    method setupWarningThread (line 930) | private static Thread setupWarningThread() {
    method getWorkload (line 947) | private static Workload getWorkload(Properties props) {
    method parseArguments (line 973) | private static Properties parseArguments(String[] args) {

FILE: core/src/main/java/com/yahoo/ycsb/CommandLine.java
  class CommandLine (line 31) | public final class CommandLine {
    method CommandLine (line 32) | private CommandLine() {
    method usageMessage (line 38) | public static void usageMessage() {
    method help (line 50) | public static void help() {
    method main (line 61) | public static void main(String[] args) {
    method parseArguments (line 160) | private static void parseArguments(String[] args, Properties props, Pr...
    method handleDelete (line 244) | private static void handleDelete(String[] tokens, String table, DB db) {
    method handleInsert (line 253) | private static void handleInsert(String[] tokens, String table, DB db) {
    method handleUpdate (line 269) | private static void handleUpdate(String[] tokens, String table, DB db) {
    method handleScan (line 285) | private static void handleScan(String[] tokens, String table, DB db) {
    method handleRead (line 316) | private static void handleRead(String[] tokens, String table, DB db) {
    method handleTable (line 337) | private static void handleTable(String[] tokens, String table) {

FILE: core/src/main/java/com/yahoo/ycsb/DB.java
  class DB (line 45) | public abstract class DB {
    method setProperties (line 54) | public void setProperties(Properties p) {
    method getProperties (line 62) | public Properties getProperties() {
    method init (line 70) | public void init() throws DBException {
    method cleanup (line 77) | public void cleanup() throws DBException {
    method read (line 89) | public abstract Status read(String table, String key, Set<String> fiel...
    method scan (line 102) | public abstract Status scan(String table, String startkey, int recordc...
    method update (line 114) | public abstract Status update(String table, String key, Map<String, By...
    method insert (line 125) | public abstract Status insert(String table, String key, Map<String, By...
    method delete (line 134) | public abstract Status delete(String table, String key);

FILE: core/src/main/java/com/yahoo/ycsb/DBException.java
  class DBException (line 23) | public class DBException extends Exception {
    method DBException (line 29) | public DBException(String message) {
    method DBException (line 33) | public DBException() {
    method DBException (line 37) | public DBException(String message, Throwable cause) {
    method DBException (line 41) | public DBException(Throwable cause) {

FILE: core/src/main/java/com/yahoo/ycsb/DBFactory.java
  class DBFactory (line 27) | public final class DBFactory {
    method DBFactory (line 28) | private DBFactory() {
    method newDB (line 32) | public static DB newDB(String dbname, Properties properties, final Tra...

FILE: core/src/main/java/com/yahoo/ycsb/DBWrapper.java
  class DBWrapper (line 31) | public class DBWrapper extends DB {
    method DBWrapper (line 52) | public DBWrapper(final DB db, final Tracer tracer) {
    method setProperties (line 69) | public void setProperties(Properties p) {
    method getProperties (line 76) | public Properties getProperties() {
    method init (line 84) | public void init() throws DBException {
    method cleanup (line 110) | public void cleanup() throws DBException {
    method read (line 130) | public Status read(String table, String key, Set<String> fields,
    method scan (line 154) | public Status scan(String table, String startkey, int recordcount,
    method measure (line 167) | private void measure(String op, Status result, long intendedStartTimeN...
    method update (line 193) | public Status update(String table, String key,
    method insert (line 216) | public Status insert(String table, String key,
    method delete (line 236) | public Status delete(String table, String key) {

FILE: core/src/main/java/com/yahoo/ycsb/GoodBadUglyDB.java
  class GoodBadUglyDB (line 35) | public class GoodBadUglyDB extends DB {
    method GoodBadUglyDB (line 41) | public GoodBadUglyDB() {
    method delay (line 45) | private void delay() {
    method init (line 81) | public void init() {
    method read (line 97) | public Status read(String table, String key, Set<String> fields, Map<S...
    method scan (line 113) | public Status scan(String table, String startkey, int recordcount, Set...
    method update (line 129) | public Status update(String table, String key, Map<String, ByteIterato...
    method insert (line 144) | public Status insert(String table, String key, Map<String, ByteIterato...
    method delete (line 156) | public Status delete(String table, String key) {

FILE: core/src/main/java/com/yahoo/ycsb/InputStreamByteIterator.java
  class InputStreamByteIterator (line 25) | public class InputStreamByteIterator extends ByteIterator {
    method InputStreamByteIterator (line 31) | public InputStreamByteIterator(InputStream ins, long len) {
    method hasNext (line 41) | @Override
    method nextByte (line 46) | @Override
    method bytesLeft (line 61) | @Override
    method reset (line 66) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/NumericByteIterator.java
  class NumericByteIterator (line 24) | public class NumericByteIterator extends ByteIterator {
    method NumericByteIterator (line 29) | public NumericByteIterator(final long value) {
    method NumericByteIterator (line 35) | public NumericByteIterator(final double value) {
    method hasNext (line 41) | @Override
    method nextByte (line 46) | @Override
    method bytesLeft (line 51) | @Override
    method reset (line 56) | @Override
    method getLong (line 61) | public long getLong() {
    method getDouble (line 68) | public double getDouble() {
    method isFloatingPoint (line 75) | public boolean isFloatingPoint() {

FILE: core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java
  class RandomByteIterator (line 22) | public class RandomByteIterator extends ByteIterator {
    method hasNext (line 28) | @Override
    method fillBytesImpl (line 33) | private void fillBytesImpl(byte[] buffer, int base) {
    method fillBytes (line 54) | private void fillBytes() {
    method RandomByteIterator (line 62) | public RandomByteIterator(long len) {
    method nextByte (line 70) | public byte nextByte() {
    method nextBuf (line 76) | @Override
    method bytesLeft (line 92) | @Override
    method reset (line 97) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/Status.java
  class Status (line 23) | public class Status {
    method Status (line 31) | public Status(String name, String description) {
    method getName (line 37) | public String getName() {
    method getDescription (line 41) | public String getDescription() {
    method toString (line 45) | @Override
    method hashCode (line 50) | @Override
    method equals (line 59) | @Override
    method isOk (line 92) | public boolean isOk() {

FILE: core/src/main/java/com/yahoo/ycsb/StringByteIterator.java
  class StringByteIterator (line 26) | public class StringByteIterator extends ByteIterator {
    method putAllAsByteIterators (line 34) | public static void putAllAsByteIterators(Map<String, ByteIterator> out...
    method putAllAsStrings (line 44) | public static void putAllAsStrings(Map<String, String> out, Map<String...
    method getByteIteratorMap (line 54) | public static Map<String, ByteIterator> getByteIteratorMap(Map<String,...
    method getStringMap (line 68) | public static Map<String, String> getStringMap(Map<String, ByteIterato...
    method StringByteIterator (line 77) | public StringByteIterator(String s) {
    method hasNext (line 82) | @Override
    method nextByte (line 87) | @Override
    method bytesLeft (line 94) | @Override
    method reset (line 99) | @Override
    method toString (line 113) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/TerminatorThread.java
  class TerminatorThread (line 28) | public class TerminatorThread extends Thread {
    method TerminatorThread (line 35) | public TerminatorThread(long maxExecutionTime, Collection<? extends Th...
    method run (line 44) | public void run() {

FILE: core/src/main/java/com/yahoo/ycsb/UnknownDBException.java
  class UnknownDBException (line 23) | public class UnknownDBException extends Exception {
    method UnknownDBException (line 29) | public UnknownDBException(String message) {
    method UnknownDBException (line 33) | public UnknownDBException() {
    method UnknownDBException (line 37) | public UnknownDBException(String message, Throwable cause) {
    method UnknownDBException (line 41) | public UnknownDBException(Throwable cause) {

FILE: core/src/main/java/com/yahoo/ycsb/Utils.java
  class Utils (line 31) | public final class Utils {
    method Utils (line 32) | private Utils() {
    method random (line 39) | public static Random random() {
    method hash (line 51) | public static long hash(long val) {
    method fnvhash64 (line 64) | public static long fnvhash64(long val) {
    method bytesToLong (line 86) | public static long bytesToLong(final byte[] bytes) {
    method longToBytes (line 102) | public static byte[] longToBytes(final long val) {
    method bytesToDouble (line 124) | public static double bytesToDouble(final byte[] bytes) {
    method doubleToBytes (line 136) | public static byte[] doubleToBytes(final double val) {
    method getActiveThreadCount (line 150) | public static int getActiveThreadCount() {
    method getUsedMemoryBytes (line 155) | public static long getUsedMemoryBytes() {
    method getUsedMemoryMegaBytes (line 161) | public static int getUsedMemoryMegaBytes() {
    method getSystemLoadAverage (line 167) | public static double getSystemLoadAverage() {
    method getGCTotalCollectionCount (line 175) | public static long getGCTotalCollectionCount() {
    method getGCTotalTime (line 189) | public static long getGCTotalTime() {
    method getGCStatst (line 211) | public static Map<String, Long[]> getGCStatst() {
    method shuffleArray (line 235) | public static <T> T [] shuffleArray(final T[] array) {

FILE: core/src/main/java/com/yahoo/ycsb/Workload.java
  class Workload (line 38) | public abstract class Workload {
    type Operation (line 47) | public enum Operation {
    method init (line 59) | public void init(Properties p) throws WorkloadException {
    method initThread (line 76) | public Object initThread(Properties p, int mythreadid, int threadcount...
    method cleanup (line 83) | public void cleanup() throws WorkloadException {
    method doInsert (line 93) | public abstract boolean doInsert(DB db, Object threadstate);
    method doTransaction (line 106) | public abstract boolean doTransaction(DB db, Object threadstate);
    method requestStop (line 111) | public void requestStop() {
    method isStopRequested (line 119) | public boolean isStopRequested() {

FILE: core/src/main/java/com/yahoo/ycsb/WorkloadException.java
  class WorkloadException (line 23) | public class WorkloadException extends Exception {
    method WorkloadException (line 29) | public WorkloadException(String message) {
    method WorkloadException (line 33) | public WorkloadException() {
    method WorkloadException (line 37) | public WorkloadException(String message, Throwable cause) {
    method WorkloadException (line 41) | public WorkloadException(Throwable cause) {

FILE: core/src/main/java/com/yahoo/ycsb/generator/AcknowledgedCounterGenerator.java
  class AcknowledgedCounterGenerator (line 25) | public class AcknowledgedCounterGenerator extends CounterGenerator {
    method AcknowledgedCounterGenerator (line 39) | public AcknowledgedCounterGenerator(long countstart) {
    method lastValue (line 50) | @Override
    method acknowledge (line 58) | public void acknowledge(long value) {

FILE: core/src/main/java/com/yahoo/ycsb/generator/ConstantIntegerGenerator.java
  class ConstantIntegerGenerator (line 23) | public class ConstantIntegerGenerator extends NumberGenerator {
    method ConstantIntegerGenerator (line 29) | public ConstantIntegerGenerator(int i) {
    method nextValue (line 33) | @Override
    method mean (line 38) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java
  class CounterGenerator (line 26) | public class CounterGenerator extends NumberGenerator {
    method CounterGenerator (line 32) | public CounterGenerator(long countstart) {
    method nextValue (line 36) | @Override
    method lastValue (line 41) | @Override
    method mean (line 46) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/DiscreteGenerator.java
  class DiscreteGenerator (line 30) | public class DiscreteGenerator extends Generator<String> {
    class Pair (line 31) | private static class Pair {
      method Pair (line 35) | Pair(double weight, String value) {
    method DiscreteGenerator (line 44) | public DiscreteGenerator() {
    method nextValue (line 51) | @Override
    method lastValue (line 79) | @Override
    method addValue (line 87) | public void addValue(double weight, String value) {

FILE: core/src/main/java/com/yahoo/ycsb/generator/ExponentialGenerator.java
  class ExponentialGenerator (line 31) | public class ExponentialGenerator extends NumberGenerator {
    method ExponentialGenerator (line 51) | public ExponentialGenerator(double mean) {
    method ExponentialGenerator (line 55) | public ExponentialGenerator(double percentile, double range) {
    method nextValue (line 67) | @Override
    method mean (line 72) | @Override
    method main (line 77) | public static void main(String[] args) {

FILE: core/src/main/java/com/yahoo/ycsb/generator/FileGenerator.java
  class FileGenerator (line 28) | public class FileGenerator extends Generator<String> {
    method FileGenerator (line 37) | public FileGenerator(String filename) {
    method nextValue (line 45) | @Override
    method lastValue (line 58) | @Override
    method reloadFile (line 66) | public synchronized void reloadFile() {

FILE: core/src/main/java/com/yahoo/ycsb/generator/Generator.java
  class Generator (line 23) | public abstract class Generator<V> {
    method nextValue (line 27) | public abstract V nextValue();
    method lastValue (line 35) | public abstract V lastValue();
    method nextString (line 37) | public final String nextString() {
    method lastString (line 42) | public final String lastString() {

FILE: core/src/main/java/com/yahoo/ycsb/generator/HistogramGenerator.java
  class HistogramGenerator (line 36) | public class HistogramGenerator extends NumberGenerator {
    method HistogramGenerator (line 44) | public HistogramGenerator(String histogramfile) throws IOException {
    method HistogramGenerator (line 75) | public HistogramGenerator(long[] buckets, int blockSize) {
    method init (line 81) | private void init() {
    method nextValue (line 90) | @Override
    method mean (line 105) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/HotspotIntegerGenerator.java
  class HotspotIntegerGenerator (line 32) | public class HotspotIntegerGenerator extends NumberGenerator {
    method HotspotIntegerGenerator (line 49) | public HotspotIntegerGenerator(long lowerBound, long upperBound,
    method nextValue (line 75) | @Override
    method getLowerBound (line 93) | public long getLowerBound() {
    method getUpperBound (line 100) | public long getUpperBound() {
    method getHotsetFraction (line 107) | public double getHotsetFraction() {
    method getHotOpnFraction (line 114) | public double getHotOpnFraction() {
    method mean (line 118) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/IncrementingPrintableStringGenerator.java
  class IncrementingPrintableStringGenerator (line 41) | public class IncrementingPrintableStringGenerator extends Generator<Stri...
    method IncrementingPrintableStringGenerator (line 156) | public IncrementingPrintableStringGenerator() {
    method IncrementingPrintableStringGenerator (line 166) | public IncrementingPrintableStringGenerator(final int length) {
    method IncrementingPrintableStringGenerator (line 179) | public IncrementingPrintableStringGenerator(final int length, final in...
    method nextValue (line 191) | @Override
    method lastValue (line 219) | @Override
    method setThrowExceptionOnRollover (line 225) | public void setThrowExceptionOnRollover(final boolean exceptionOnRollo...
    method getThrowExceptionOnRollover (line 230) | public boolean getThrowExceptionOnRollover() {
    method printableBasicAlphaASCIISet (line 239) | public static int[] printableBasicAlphaASCIISet() {
    method printableBasicAlphaNumericASCIISet (line 255) | public static int[] printableBasicAlphaNumericASCIISet() {
    method fullPrintableBasicASCIISet (line 270) | public static int[] fullPrintableBasicASCIISet() {
    method fullPrintableBasicASCIISetWithNewlines (line 285) | public static int[] fullPrintableBasicASCIISetWithNewlines() {
    method printableAlphaNumericPlaneZeroSet (line 301) | public static int[] printableAlphaNumericPlaneZeroSet() {
    method fullPrintablePlaneZeroSet (line 316) | public static int[] fullPrintablePlaneZeroSet() {
    method generatePrintableCharacterSet (line 347) | public static List<Integer> generatePrintableCharacterSet(

FILE: core/src/main/java/com/yahoo/ycsb/generator/NumberGenerator.java
  class NumberGenerator (line 24) | public abstract class NumberGenerator extends Generator<Number> {
    method setLastValue (line 31) | protected void setLastValue(Number last) {
    method lastValue (line 36) | @Override
    method mean (line 44) | public abstract double mean();

FILE: core/src/main/java/com/yahoo/ycsb/generator/RandomDiscreteTimestampGenerator.java
  class RandomDiscreteTimestampGenerator (line 42) | public class RandomDiscreteTimestampGenerator extends UnixEpochTimestamp...
    method RandomDiscreteTimestampGenerator (line 65) | public RandomDiscreteTimestampGenerator(final long interval, final Tim...
    method RandomDiscreteTimestampGenerator (line 86) | public RandomDiscreteTimestampGenerator(final long interval, final Tim...
    method setup (line 97) | private void setup() {
    method nextValue (line 109) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/ScrambledZipfianGenerator.java
  class ScrambledZipfianGenerator (line 32) | public class ScrambledZipfianGenerator extends NumberGenerator {
    method ScrambledZipfianGenerator (line 47) | public ScrambledZipfianGenerator(long items) {
    method ScrambledZipfianGenerator (line 57) | public ScrambledZipfianGenerator(long min, long max) {
    method ScrambledZipfianGenerator (line 84) | public ScrambledZipfianGenerator(long min, long max, double zipfiancon...
    method nextValue (line 100) | @Override
    method main (line 108) | public static void main(String[] args) {
    method mean (line 123) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/SequentialGenerator.java
  class SequentialGenerator (line 25) | public class SequentialGenerator extends NumberGenerator {
    method SequentialGenerator (line 33) | public SequentialGenerator(long countstart, long countend) {
    method nextLong (line 44) | public long nextLong() {
    method nextValue (line 50) | @Override
    method lastValue (line 57) | @Override
    method mean (line 62) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/SkewedLatestGenerator.java
  class SkewedLatestGenerator (line 23) | public class SkewedLatestGenerator extends NumberGenerator {
    method SkewedLatestGenerator (line 27) | public SkewedLatestGenerator(CounterGenerator basis) {
    method nextValue (line 37) | @Override
    method main (line 45) | public static void main(String[] args) {
    method mean (line 52) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/UniformGenerator.java
  class UniformGenerator (line 27) | public class UniformGenerator extends Generator<String> {
    method UniformGenerator (line 35) | public UniformGenerator(Collection<String> values) {
    method nextValue (line 44) | @Override
    method lastValue (line 55) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/UniformLongGenerator.java
  class UniformLongGenerator (line 25) | public class UniformLongGenerator extends NumberGenerator {
    method UniformLongGenerator (line 36) | public UniformLongGenerator(long lb, long ub) {
    method nextValue (line 42) | @Override
    method mean (line 50) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/generator/UnixEpochTimestampGenerator.java
  class UnixEpochTimestampGenerator (line 44) | public class UnixEpochTimestampGenerator extends Generator<Long> {
    method UnixEpochTimestampGenerator (line 64) | public UnixEpochTimestampGenerator() {
    method UnixEpochTimestampGenerator (line 73) | public UnixEpochTimestampGenerator(final long interval, final TimeUnit...
    method UnixEpochTimestampGenerator (line 94) | public UnixEpochTimestampGenerator(final long interval, final TimeUnit...
    method initalizeTimestamp (line 110) | public void initalizeTimestamp(final long intervalOffset) {
    method nextValue (line 143) | @Override
    method getOffset (line 155) | public long getOffset(final long intervalOffset) {
    method lastValue (line 173) | @Override
    method currentValue (line 179) | public long currentValue() {

FILE: core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java
  class ZipfianGenerator (line 42) | public class ZipfianGenerator extends NumberGenerator {
    method ZipfianGenerator (line 90) | public ZipfianGenerator(long items) {
    method ZipfianGenerator (line 99) | public ZipfianGenerator(long min, long max) {
    method ZipfianGenerator (line 109) | public ZipfianGenerator(long items, double zipfianconstant) {
    method ZipfianGenerator (line 119) | public ZipfianGenerator(long min, long max, double zipfianconstant) {
    method ZipfianGenerator (line 132) | public ZipfianGenerator(long min, long max, double zipfianconstant, do...
    method zeta (line 159) | double zeta(long n, double thetaVal) {
    method zetastatic (line 170) | static double zetastatic(long n, double theta) {
    method zeta (line 184) | double zeta(long st, long n, double thetaVal, double initialsum) {
    method zetastatic (line 198) | static double zetastatic(long st, long n, double theta, double initial...
    method nextLong (line 219) | long nextLong(long itemcount) {
    method nextValue (line 272) | @Override
    method main (line 277) | public static void main(String[] args) {
    method mean (line 284) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java
  class Measurements (line 30) | public class Measurements {
    type MeasurementType (line 34) | public enum MeasurementType {
    method setProperties (line 55) | public static void setProperties(Properties props) {
    method getMeasurements (line 62) | public static synchronized Measurements getMeasurements() {
    method Measurements (line 78) | public Measurements(Properties props) {
    method constructOneMeasurement (line 124) | private OneMeasurement constructOneMeasurement(String name) {
    class StartTimeHolder (line 147) | static class StartTimeHolder {
      method startTime (line 150) | long startTime() {
    method initialValue (line 160) | protected StartTimeHolder initialValue() {
    method setIntendedStartTimeNs (line 165) | public void setIntendedStartTimeNs(long time) {
    method getIntendedtartTimeNs (line 172) | public long getIntendedtartTimeNs() {
    method measure (line 183) | public void measure(String operation, int latency) {
    method measureIntended (line 202) | public void measureIntended(String operation, int latency) {
    method getOpMeasurement (line 217) | private OneMeasurement getOpMeasurement(String operation) {
    method getOpIntendedMeasurement (line 229) | private OneMeasurement getOpIntendedMeasurement(String operation) {
    method reportStatus (line 245) | public void reportStatus(final String operation, final Status status) {
    method exportMeasurements (line 258) | public void exportMeasurements(MeasurementsExporter exporter) throws I...
    method getSummary (line 270) | public synchronized String getSummary() {

FILE: core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java
  class OneMeasurement (line 31) | public abstract class OneMeasurement {
    method getName (line 36) | public String getName() {
    method OneMeasurement (line 43) | public OneMeasurement(String name) {
    method measure (line 48) | public abstract void measure(int latency);
    method getSummary (line 50) | public abstract String getSummary();
    method reportStatus (line 55) | public void reportStatus(Status status) {
    method exportMeasurements (line 75) | public abstract void exportMeasurements(MeasurementsExporter exporter)...
    method exportStatusCounts (line 77) | protected final void exportStatusCounts(MeasurementsExporter exporter)...

FILE: core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java
  class OneMeasurementHdrHistogram (line 39) | public class OneMeasurementHdrHistogram extends OneMeasurement {
    method OneMeasurementHdrHistogram (line 60) | public OneMeasurementHdrHistogram(String name, Properties props) {
    method measure (line 89) | public void measure(int latencyInMicros) {
    method exportMeasurements (line 96) | @Override
    method getSummary (line 137) | @Override
    method getIntervalHistogramAndAccumulate (line 154) | private Histogram getIntervalHistogramAndAccumulate() {
    method getPercentileValues (line 171) | private List<Double> getPercentileValues(String percentileString) {
    method ordinal (line 195) | private String ordinal(Double i) {

FILE: core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java
  class OneMeasurementHistogram (line 30) | public class OneMeasurementHistogram extends OneMeasurement {
    method OneMeasurementHistogram (line 74) | public OneMeasurementHistogram(String name, Properties props) {
    method measure (line 91) | public synchronized void measure(int latency) {
    method exportMeasurements (line 113) | @Override
    method getSummary (line 145) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementRaw.java
  class OneMeasurementRaw (line 36) | public class OneMeasurementRaw extends OneMeasurement {
    class RawDataPoint (line 41) | class RawDataPoint {
      method RawDataPoint (line 45) | public RawDataPoint(int value) {
      method timeStamp (line 50) | public long timeStamp() {
      method value (line 54) | public int value() {
    class RawDataPointComparator (line 59) | class RawDataPointComparator implements Comparator<RawDataPoint> {
      method compare (line 60) | @Override
    method OneMeasurementRaw (line 104) | public OneMeasurementRaw(String name, Properties props) {
    method measure (line 132) | @Override
    method exportMeasurements (line 141) | @Override
    method getSummary (line 192) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java
  class SeriesUnit (line 27) | class SeriesUnit {
    method SeriesUnit (line 32) | public SeriesUnit(long time, double average) {
  class OneMeasurementTimeSeries (line 44) | public class OneMeasurementTimeSeries extends OneMeasurement {
    method OneMeasurementTimeSeries (line 69) | public OneMeasurementTimeSeries(String name, Properties props) {
    method checkEndOfUnit (line 75) | private synchronized void checkEndOfUnit(boolean forceend) {
    method measure (line 96) | @Override
    method exportMeasurements (line 117) | @Override
    method getSummary (line 134) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java
  class TwoInOneMeasurement (line 28) | public class TwoInOneMeasurement extends OneMeasurement {
    method TwoInOneMeasurement (line 32) | public TwoInOneMeasurement(String name, OneMeasurement thing1, OneMeas...
    method reportStatus (line 41) | @Override
    method measure (line 50) | @Override
    method exportMeasurements (line 59) | @Override
    method getSummary (line 71) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONArrayMeasurementsExporter.java
  class JSONArrayMeasurementsExporter (line 31) | public class JSONArrayMeasurementsExporter implements MeasurementsExport...
    method JSONArrayMeasurementsExporter (line 35) | public JSONArrayMeasurementsExporter(OutputStream os) throws IOExcepti...
    method write (line 42) | public void write(String metric, String measurement, int i) throws IOE...
    method write (line 50) | public void write(String metric, String measurement, long i) throws IO...
    method write (line 58) | public void write(String metric, String measurement, double d) throws ...
    method close (line 66) | public void close() throws IOException {

FILE: core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONMeasurementsExporter.java
  class JSONMeasurementsExporter (line 31) | public class JSONMeasurementsExporter implements MeasurementsExporter {
    method JSONMeasurementsExporter (line 36) | public JSONMeasurementsExporter(OutputStream os) throws IOException {
    method write (line 43) | public void write(String metric, String measurement, int i) throws IOE...
    method write (line 51) | public void write(String metric, String measurement, long i) throws IO...
    method write (line 59) | public void write(String metric, String measurement, double d) throws ...
    method close (line 67) | public void close() throws IOException {

FILE: core/src/main/java/com/yahoo/ycsb/measurements/exporter/MeasurementsExporter.java
  type MeasurementsExporter (line 26) | public interface MeasurementsExporter extends Closeable {
    method write (line 35) | void write(String metric, String measurement, int i) throws IOException;
    method write (line 45) | void write(String metric, String measurement, long i) throws IOException;
    method write (line 55) | void write(String metric, String measurement, double d) throws IOExcep...

FILE: core/src/main/java/com/yahoo/ycsb/measurements/exporter/TextMeasurementsExporter.java
  class TextMeasurementsExporter (line 27) | public class TextMeasurementsExporter implements MeasurementsExporter {
    method TextMeasurementsExporter (line 30) | public TextMeasurementsExporter(OutputStream os) {
    method write (line 34) | public void write(String metric, String measurement, int i) throws IOE...
    method write (line 39) | public void write(String metric, String measurement, long i) throws IO...
    method write (line 44) | public void write(String metric, String measurement, double d) throws ...
    method close (line 49) | public void close() throws IOException {

FILE: core/src/main/java/com/yahoo/ycsb/workloads/ConstantOccupancyWorkload.java
  class ConstantOccupancyWorkload (line 45) | public class ConstantOccupancyWorkload extends CoreWorkload {
    method init (line 61) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java
  class CoreWorkload (line 64) | public class CoreWorkload extends Workload {
    method getFieldLengthGenerator (line 325) | protected static NumberGenerator getFieldLengthGenerator(Properties p)...
    method init (line 357) | @Override
    method buildKeyName (line 478) | protected String buildKeyName(long keynum) {
    method buildSingleValue (line 494) | private HashMap<String, ByteIterator> buildSingleValue(String key) {
    method buildValues (line 513) | private HashMap<String, ByteIterator> buildValues(String key) {
    method buildDeterministicValue (line 532) | private String buildDeterministicValue(String key, String fieldkey) {
    method doInsert (line 553) | @Override
    method doTransaction (line 596) | @Override
    method verifyRow (line 630) | protected void verifyRow(String key, HashMap<String, ByteIterator> cel...
    method nextKeynum (line 649) | long nextKeynum() {
    method doTransactionRead (line 663) | public void doTransactionRead(DB db) {
    method doTransactionReadModifyWrite (line 690) | public void doTransactionReadModifyWrite(DB db) {
    method doTransactionScan (line 737) | public void doTransactionScan(DB db) {
    method doTransactionUpdate (line 759) | public void doTransactionUpdate(DB db) {
    method doTransactionInsert (line 778) | public void doTransactionInsert(DB db) {
    method createOperationGenerator (line 802) | protected static DiscreteGenerator createOperationGenerator(final Prop...

FILE: core/src/main/java/com/yahoo/ycsb/workloads/RestWorkload.java
  class RestWorkload (line 42) | public class RestWorkload extends CoreWorkload {
    method init (line 114) | @Override
    method createOperationGenerator (line 150) | public static DiscreteGenerator createOperationGenerator(final Propert...
    method getKeyChooser (line 162) | private static NumberGenerator getKeyChooser(String requestDistrib, in...
    method getFieldLengthGenerator (line 193) | protected static NumberGenerator getFieldLengthGenerator(Properties p)...
    method getTrace (line 211) | private static Map<Integer, String> getTrace(String filePath, int reco...
    method doInsert (line 237) | @Override
    method doTransaction (line 242) | @Override
    method getNextURL (line 268) | private String getNextURL(int opType) {
    method doTransactionRead (line 280) | @Override
    method doTransactionInsert (line 286) | @Override
    method doTransactionDelete (line 294) | public void doTransactionDelete(DB db) {
    method doTransactionUpdate (line 298) | @Override

FILE: core/src/main/java/com/yahoo/ycsb/workloads/TimeSeriesWorkload.java
  class TimeSeriesWorkload (line 282) | public class TimeSeriesWorkload extends Workload {
    type ValueType (line 287) | public enum ValueType {
      method ValueType (line 294) | ValueType(final String name) {
      method fromString (line 298) | public static ValueType fromString(final String name) {
    method init (line 542) | @Override
    method initThread (line 683) | @Override
    method doInsert (line 691) | @Override
    method doTransaction (line 704) | @Override
    method doTransactionRead (line 731) | protected void doTransactionRead(final DB db, Object threadstate) {
    method doTransactionUpdate (line 781) | protected void doTransactionUpdate(final DB db, Object threadstate) {
    method doTransactionInsert (line 790) | protected void doTransactionInsert(final DB db, Object threadstate) {
    method doTransactionScan (line 794) | protected void doTransactionScan(final DB db, Object threadstate) {
    method doTransactionDelete (line 843) | protected void doTransactionDelete(final DB db, Object threadstate) {
    method verifyRow (line 893) | protected Status verifyRow(final String key, final Map<String, ByteIte...
    method validationFunction (line 930) | protected long validationFunction(final String key, final long timestamp,
    method initKeysAndTags (line 945) | protected void initKeysAndTags() throws WorkloadException {
    method validateSettings (line 1050) | protected void validateSettings() throws WorkloadException {
    class ThreadState (line 1083) | protected class ThreadState {
      method ThreadState (line 1114) | protected ThreadState(final int threadID, final int threadCount) thr...
      method nextDataPoint (line 1170) | protected String nextDataPoint(final Map<String, ByteIterator> map, ...

FILE: core/src/test/java/com/yahoo/ycsb/TestByteIterator.java
  class TestByteIterator (line 23) | public class TestByteIterator {
    method testRandomByteIterator (line 24) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/TestNumericByteIterator.java
  class TestNumericByteIterator (line 22) | public class TestNumericByteIterator {
    method testLong (line 24) | @Test
    method testDouble (line 71) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/TestStatus.java
  class TestStatus (line 27) | public class TestStatus {
    method testAcceptableStatus (line 29) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/TestUtils.java
  class TestUtils (line 27) | public class TestUtils {
    method bytesToFromLong (line 29) | @Test
    method bytesToFromDouble (line 57) | @Test
    method bytesToLongNull (line 87) | @Test (expectedExceptions = NullPointerException.class)
    method bytesToLongTooShort (line 92) | @Test (expectedExceptions = IndexOutOfBoundsException.class)
    method bytesToDoubleTooShort (line 97) | @Test (expectedExceptions = IllegalArgumentException.class)
    method jvmUtils (line 102) | @Test
    method assertArrayEquals (line 126) | public void assertArrayEquals(final byte[] actual, final byte[] expect...

FILE: core/src/test/java/com/yahoo/ycsb/generator/AcknowledgedCounterGeneratorTest.java
  class AcknowledgedCounterGeneratorTest (line 28) | public class AcknowledgedCounterGeneratorTest {
    method testIncrementPastIntegerMaxValue (line 33) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/generator/TestIncrementingPrintableStringGenerator.java
  class TestIncrementingPrintableStringGenerator (line 27) | public class TestIncrementingPrintableStringGenerator {
    method rolloverOK (line 30) | @Test
    method rolloverOneCharacterOK (line 58) | @Test
    method rolloverException (line 68) | @Test
    method rolloverOneCharacterException (line 86) | @Test
    method invalidLengths (line 105) | @Test
    method invalidCharacterSets (line 118) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/generator/TestRandomDiscreteTimestampGenerator.java
  class TestRandomDiscreteTimestampGenerator (line 29) | public class TestRandomDiscreteTimestampGenerator {
    method systemTime (line 31) | @Test
    method withStartTime (line 46) | @Test
    method tooLarge (line 67) | @Test (expectedExceptions = IllegalArgumentException.class)

FILE: core/src/test/java/com/yahoo/ycsb/generator/TestUnixEpochTimestampGenerator.java
  class TestUnixEpochTimestampGenerator (line 24) | public class TestUnixEpochTimestampGenerator {
    method defaultCtor (line 26) | @Test
    method ctorWithIntervalAndUnits (line 38) | @Test
    method ctorWithIntervalAndUnitsAndStart (line 49) | @Test
    method variousIntervalsAndUnits (line 59) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java
  class TestZipfianGenerator (line 25) | public class TestZipfianGenerator {
    method testMinAndMaxParameter (line 26) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/measurements/exporter/TestMeasurementsExporter.java
  class TestMeasurementsExporter (line 32) | public class TestMeasurementsExporter {
    method testJSONArrayMeasurementsExporter (line 33) | @Test

FILE: core/src/test/java/com/yahoo/ycsb/workloads/TestCoreWorkload.java
  class TestCoreWorkload (line 27) | public class TestCoreWorkload {
    method createOperationChooser (line 29) | @Test
    method createOperationChooserNullProperties (line 66) | @Test (expectedExceptions = IllegalArgumentException.class)

FILE: core/src/test/java/com/yahoo/ycsb/workloads/TestTimeSeriesWorkload.java
  class TestTimeSeriesWorkload (line 48) | public class TestTimeSeriesWorkload {
    method twoThreads (line 50) | @Test
    method badTimeUnit (line 105) | @Test (expectedExceptions = WorkloadException.class)
    method failedToInitWorkloadBeforeThreadInit (line 112) | @Test (expectedExceptions = WorkloadException.class)
    method failedToInitThread (line 123) | @Test (expectedExceptions = IllegalStateException.class)
    method insertOneKeyTwoTagsLowCardinality (line 132) | @Test
    method insertTwoKeysTwoTagsLowCardinality (line 163) | @Test
    method insertTwoKeysTwoThreads (line 202) | @Test
    method insertThreeKeysTwoThreads (line 256) | @Test
    method insertWithValidation (line 318) | @Test
    method read (line 364) | @Test
    method verifyRow (line 376) | @Test
    method validateSettingsDataIntegrity (line 410) | @Test
    method getUTProperties (line 462) | private Properties getUTProperties() {
    method getWorkload (line 478) | private TimeSeriesWorkload getWorkload(final Properties p, final boole...
    class MockDB (line 490) | static class MockDB extends DB {
      method read (line 495) | @Override
      method scan (line 501) | @Override
      method update (line 508) | @Override
      method insert (line 515) | @Override
      method delete (line 523) | @Override
      method dumpStdout (line 529) | public void dumpStdout() {

FILE: couchbase/src/main/java/com/yahoo/ycsb/db/CouchbaseClient.java
  class CouchbaseClient (line 54) | public class CouchbaseClient extends DB {
    method init (line 83) | @Override
    method parseReplicateTo (line 130) | private ReplicateTo parseReplicateTo(final String property) throws DBE...
    method parsePersistTo (line 154) | private PersistTo parsePersistTo(final String property) throws DBExcep...
    method cleanup (line 176) | @Override
    method read (line 181) | @Override
    method scan (line 203) | @Override
    method update (line 227) | @Override
    method insert (line 242) | @Override
    method delete (line 257) | @Override
    method formatKey (line 279) | private String formatKey(final String prefix, final String key) {
    method checkFutureStatus (line 289) | private Status checkFutureStatus(final OperationFuture<?> future) {
    method decode (line 304) | private void decode(final Object source, final Set<String> fields, fin...
    method encode (line 337) | private Object encode(final Map<String, ByteIterator> source) {

FILE: couchbase2/src/main/java/com/yahoo/ycsb/db/couchbase2/Couchbase2Client.java
  class Couchbase2Client (line 100) | public class Couchbase2Client extends DB {
    method init (line 134) | @Override
    method logParams (line 219) | private void logParams() {
    method read (line 242) | @Override
    method readKv (line 266) | private Status readKv(final String docId, final Set<String> fields, fi...
    method readN1ql (line 286) | private Status readN1ql(final String docId, Set<String> fields, final ...
    method update (line 321) | @Override
    method updateKv (line 347) | private Status updateKv(final String docId, final Map<String, ByteIter...
    method updateN1ql (line 365) | private Status updateN1ql(final String docId, final Map<String, ByteIt...
    method insert (line 383) | @Override
    method insertKv (line 413) | private Status insertKv(final String docId, final Map<String, ByteIter...
    method insertN1ql (line 446) | private Status insertN1ql(final String docId, final Map<String, ByteIt...
    method upsert (line 473) | private Status upsert(final String table, final String key, final Map<...
    method upsertKv (line 496) | private Status upsertKv(final String docId, final Map<String, ByteIter...
    method upsertN1ql (line 514) | private Status upsertN1ql(final String docId, final Map<String, ByteIt...
    method delete (line 531) | @Override
    method deleteKv (line 552) | private Status deleteKv(final String docId) {
    method deleteN1ql (line 569) | private Status deleteN1ql(final String docId) throws Exception {
    method scan (line 584) | @Override
    method scanAllFields (line 612) | private Status scanAllFields(final String table, final String startkey...
    method scanSpecificFields (line 673) | private Status scanSpecificFields(final String table, final String sta...
    method waitForMutationResponse (line 716) | private void waitForMutationResponse(final Observable<? extends Docume...
    method encodeN1qlFields (line 742) | private static String encodeN1qlFields(final Map<String, ByteIterator>...
    method valuesToJsonObject (line 763) | private static JsonObject valuesToJsonObject(final Map<String, ByteIte...
    method joinFields (line 777) | private static String joinFields(final Set<String> fields) {
    method formatId (line 796) | private static String formatId(final String prefix, final String key) {
    method parseReplicateTo (line 806) | private static ReplicateTo parseReplicateTo(final String property) thr...
    method parsePersistTo (line 829) | private static PersistTo parsePersistTo(final String property) throws ...
    method decode (line 855) | private void decode(final String source, final Set<String> fields,
    method encode (line 882) | private String encode(final Map<String, ByteIterator> source) {
  class BackoffSelectStrategyFactory (line 903) | class BackoffSelectStrategyFactory implements SelectStrategyFactory {
    method newSelectStrategy (line 904) | @Override
  class BackoffSelectStrategy (line 913) | class BackoffSelectStrategy implements SelectStrategy {
    method calculateStrategy (line 917) | @Override

FILE: dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java
  class DynamoDBClient (line 41) | public class DynamoDBClient extends DB {
    type PrimaryKeyType (line 50) | private enum PrimaryKeyType {
    method init (line 72) | @Override
    method read (line 139) | @Override
    method scan (line 169) | @Override
    method update (line 230) | @Override
    method insert (line 256) | @Override
    method delete (line 285) | @Override
    method createAttributes (line 305) | private static Map<String, AttributeValue> createAttributes(Map<String...
    method extractResult (line 313) | private HashMap<String, ByteIterator> extractResult(Map<String, Attrib...
    method createPrimaryKey (line 328) | private Map<String, AttributeValue> createPrimaryKey(String key) {

FILE: elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticsearchClient.java
  class ElasticsearchClient (line 68) | public class ElasticsearchClient extends DB {
    method init (line 84) | @Override
    method parseIntegerProperty (line 167) | private int parseIntegerProperty(Properties properties, String key, in...
    method cleanup (line 172) | @Override
    method insert (line 198) | @Override
    method delete (line 228) | @Override
    method read (line 257) | @Override
    method update (line 298) | @Override
    method scan (line 338) | @Override

FILE: elasticsearch/src/test/java/com/yahoo/ycsb/db/ElasticsearchClientTest.java
  class ElasticsearchClientTest (line 43) | public class ElasticsearchClientTest {
    method setUpClass (line 60) | @BeforeClass
    method tearDownClass (line 68) | @AfterClass
    method setUp (line 73) | @Before
    method tearDown (line 79) | @After
    method testInsert (line 88) | @Test
    method testDelete (line 97) | @Test
    method testRead (line 106) | @Test
    method testUpdate (line 117) | @Test
    method testScan (line 141) | @Test

FILE: elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/Elasticsearch5.java
  class Elasticsearch5 (line 22) | final class Elasticsearch5 {
    method Elasticsearch5 (line 24) | private Elasticsearch5() {
    method parseIntegerProperty (line 30) | static int parseIntegerProperty(final Properties properties, final Str...

FILE: elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchClient.java
  class ElasticsearchClient (line 59) | public class ElasticsearchClient extends DB {
    method init (line 74) | @Override
    method cleanup (line 141) | @Override
    method insert (line 151) | @Override
    method delete (line 180) | @Override
    method read (line 208) | @Override
    method update (line 241) | @Override
    method scan (line 274) | @Override
    method refreshIfNeeded (line 311) | private void refreshIfNeeded() {
    method search (line 328) | private SearchResponse search(final String table, final String key) {

FILE: elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchRestClient.java
  class ElasticsearchRestClient (line 57) | public class ElasticsearchRestClient extends DB {
    method init (line 71) | @Override
    method performRequest (line 131) | private static Response performRequest(
    method performRequest (line 139) | private static Response performRequest(
    method performRequest (line 149) | private static Response performRequest(
    method cleanup (line 174) | @Override
    method insert (line 188) | @Override
    method delete (line 217) | @Override
    method read (line 255) | @Override
    method update (line 299) | @Override
    method scan (line 345) | @Override
    method refreshIfNeeded (line 398) | private void refreshIfNeeded() throws IOException {
    method search (line 415) | private Response search(final String table, final String key) throws I...
    method search (line 428) | private Response search(final String table, final XContentBuilder buil...
    method map (line 436) | private Map<String, Object> map(final Response response) throws IOExce...

FILE: elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchClientIT.java
  class ElasticsearchClientIT (line 22) | public class ElasticsearchClientIT extends ElasticsearchIntegTestBase {
    method newDB (line 24) | @Override

FILE: elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchIntegTestBase.java
  class ElasticsearchIntegTestBase (line 20) | public abstract class ElasticsearchIntegTestBase {
    method newDB (line 24) | abstract DB newDB();
    method setUp (line 36) | @Before
    method tearDown (line 49) | @After
    method testInsert (line 54) | @Test
    method testDelete (line 63) | @Test
    method testRead (line 72) | @Test
    method testUpdate (line 83) | @Test
    method testScan (line 108) | @Test

FILE: elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchRestClientIT.java
  class ElasticsearchRestClientIT (line 22) | public class ElasticsearchRestClientIT extends ElasticsearchIntegTestBase {
    method newDB (line 24) | @Override

FILE: geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java
  class GeodeClient (line 54) | public class GeodeClient extends DB {
    method init (line 94) | @Override
    method read (line 137) | @Override
    method scan (line 157) | @Override
    method update (line 164) | @Override
    method insert (line 170) | @Override
    method delete (line 176) | @Override
    method convertToBytearrayMap (line 182) | private PdxInstance convertToBytearrayMap(Map<String, ByteIterator> va...
    method getRegion (line 192) | private Region<String, PdxInstance> getRegion(String table) {

FILE: googlebigtable/src/main/java/com/yahoo/ycsb/db/GoogleBigtableClient.java
  class GoogleBigtableClient (line 71) | public class GoogleBigtableClient extends com.yahoo.ycsb.DB {
    method init (line 111) | @Override
    method cleanup (line 172) | @Override
    method read (line 200) | @Override
    method scan (line 275) | @Override
    method update (line 362) | @Override
    method insert (line 400) | @Override
    method delete (line 406) | @Override
    method setTable (line 438) | private void setTable(final String table) {

FILE: googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java
  class GoogleDatastoreClient (line 54) | public class GoogleDatastoreClient extends DB {
    type MutationType (line 58) | private enum MutationType {
    type EntityGroupingMode (line 67) | private enum EntityGroupingMode {
    method init (line 92) | @Override
    method read (line 189) | @Override
    method scan (line 242) | @Override
    method update (line 249) | @Override
    method insert (line 256) | @Override
    method delete (line 266) | @Override
    method buildPrimaryKey (line 271) | private Key.Builder buildPrimaryKey(String table, String key) {
    method doSingleItemMutation (line 284) | private Status doSingleItemMutation(String table, String key,

FILE: hbase098/src/main/java/com/yahoo/ycsb/db/HBaseClient.java
  class HBaseClient (line 43) | public class HBaseClient extends com.yahoo.ycsb.DB {
    method init (line 67) | public void init() throws DBException {
    method cleanup (line 129) | public void cleanup() throws DBException {
    method getHTable (line 151) | private void getHTable(String table) throws IOException {
    method read (line 171) | public Status read(String table, String key, Set<String> fields, Map<S...
    method scan (line 231) | public Status scan(String table, String startkey, int recordcount, Set...
    method update (line 310) | public Status update(String table, String key, Map<String, ByteIterato...
    method insert (line 361) | public Status insert(String table, String key, Map<String, ByteIterato...
    method delete (line 372) | public Status delete(String table, String key) {
    method main (line 402) | public static void main(String[] args) {

FILE: hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
  class HBaseClient10 (line 68) | public class HBaseClient10 extends com.yahoo.ycsb.DB {
    method init (line 114) | @Override
    method cleanup (line 187) | @Override
    method getHTable (line 219) | public void getHTable(String table) throws IOException {
    method read (line 243) | public Status read(String table, String key, Set<String> fields,
    method scan (line 317) | @Override
    method update (line 410) | @Override
    method insert (line 472) | @Override
    method delete (line 487) | @Override
    method setConfiguration (line 524) | @VisibleForTesting

FILE: hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java
  class HBaseClient10Test (line 58) | public class HBaseClient10Test {
    method isWindows (line 67) | private static boolean isWindows() {
    method setUpClass (line 77) | @BeforeClass
    method tearDownClass (line 89) | @AfterClass
    method setUp (line 101) | @Before
    method tearDown (line 120) | @After
    method testRead (line 126) | @Test
    method testReadMissingRow (line 144) | @Test
    method testScan (line 152) | @Test
    method testUpdate (line 187) | @Test
    method testDelete (line 208) | @Test

FILE: hbase12/src/main/java/com/yahoo/ycsb/db/hbase12/HBaseClient12.java
  class HBaseClient12 (line 27) | public class HBaseClient12 extends com.yahoo.ycsb.db.HBaseClient10 {

FILE: hbase12/src/test/java/com/yahoo/ycsb/db/hbase12/HBaseClient12Test.java
  class HBaseClient12Test (line 57) | public class HBaseClient12Test {
    method isWindows (line 66) | private static boolean isWindows() {
    method setUpClass (line 76) | @BeforeClass
    method tearDownClass (line 88) | @AfterClass
    method setUp (line 100) | @Before
    method tearDown (line 119) | @After
    method testRead (line 125) | @Test
    method testReadMissingRow (line 143) | @Test
    method testScan (line 151) | @Test
    method testUpdate (line 186) | @Test
    method testDelete (line 207) | @Test

FILE: hypertable/src/main/java/com/yahoo/ycsb/db/HypertableClient.java
  class HypertableClient (line 44) | public class HypertableClient extends com.yahoo.ycsb.DB {
    method init (line 61) | @Override
    method cleanup (line 93) | @Override
    method read (line 118) | @Override
    method scan (line 180) | @Override
    method update (line 253) | @Override
    method insert (line 272) | @Override
    method delete (line 317) | @Override

FILE: infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanClient.java
  class InfinispanClient (line 43) | public class InfinispanClient extends DB {
    method InfinispanClient (line 51) | public InfinispanClient() {
    method init (line 55) | public void init() throws DBException {
    method cleanup (line 63) | public void cleanup() {
    method read (line 68) | public Status read(String table, String key, Set<String> fields, Map<S...
    method scan (line 94) | public Status scan(String table, String startkey, int recordcount,
    method update (line 100) | public Status update(String table, String key, Map<String, ByteIterato...
    method insert (line 123) | public Status insert(String table, String key, Map<String, ByteIterato...
    method delete (line 140) | public Status delete(String table, String key) {

FILE: infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanRemoteClient.java
  class InfinispanRemoteClient (line 34) | public class InfinispanRemoteClient extends DB {
    method init (line 41) | @Override
    method cleanup (line 47) | @Override
    method insert (line 53) | @Override
    method read (line 67) | @Override
    method scan (line 95) | @Override
    method update (line 102) | @Override
    method delete (line 116) | @Override
    method cache (line 128) | private RemoteCache<String, Map<String, String>> cache() {
    method createKey (line 136) | private String createKey(String table, String recordKey) {

FILE: infinispan/src/main/java/com/yahoo/ycsb/db/RemoteCacheManagerHolder.java
  class RemoteCacheManagerHolder (line 27) | final class RemoteCacheManagerHolder {
    method RemoteCacheManagerHolder (line 31) | private RemoteCacheManagerHolder() {
    method getInstance (line 34) | static RemoteCacheManager getInstance(Properties props) {

FILE: jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCli.java
  class JdbcDBCli (line 33) | public final class JdbcDBCli {
    method usageMessage (line 35) | private static void usageMessage() {
    method executeCommand (line 42) | private static void executeCommand(Properties props, String sql) throw...
    method main (line 73) | public static void main(String[] args) {
    method JdbcDBCli (line 178) | private JdbcDBCli() {

FILE: jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java
  class JdbcDBClient (line 45) | public class JdbcDBClient extends DB {
    class OrderedFieldInfo (line 102) | private static class OrderedFieldInfo {
      method OrderedFieldInfo (line 106) | OrderedFieldInfo(String fieldKeys, List<String> fieldValues) {
      method getFieldKeys (line 111) | String getFieldKeys() {
      method getFieldValues (line 115) | List<String> getFieldValues() {
    method getShardIndexByKey (line 126) | private int getShardIndexByKey(String key) {
    method getShardConnectionByKey (line 138) | private Connection getShardConnectionByKey(String key) {
    method cleanupAllConnections (line 142) | private void cleanupAllConnections() throws SQLException {
    method getIntProperty (line 152) | private static int getIntProperty(Properties props, String key) throws...
    method getBoolProperty (line 166) | private static boolean getBoolProperty(Properties props, String key, b...
    method init (line 174) | @Override
    method cleanup (line 232) | @Override
    method createAndCacheInsertStatement (line 256) | private PreparedStatement createAndCacheInsertStatement(StatementType ...
    method createAndCacheReadStatement (line 267) | private PreparedStatement createAndCacheReadStatement(StatementType re...
    method createAndCacheDeleteStatement (line 278) | private PreparedStatement createAndCacheDeleteStatement(StatementType ...
    method createAndCacheUpdateStatement (line 289) | private PreparedStatement createAndCacheUpdateStatement(StatementType ...
    method createAndCacheScanStatement (line 300) | private PreparedStatement createAndCacheScanStatement(StatementType sc...
    method read (line 314) | @Override
    method scan (line 342) | @Override
    method update (line 372) | @Override
    method insert (line 399) | @Override
    method delete (line 466) | @Override
    method getFieldInfo (line 486) | private OrderedFieldInfo getFieldInfo(Map<String, ByteIterator> values) {

FILE: jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCreateTable.java
  class JdbcDBCreateTable (line 33) | public final class JdbcDBCreateTable {
    method usageMessage (line 35) | private static void usageMessage() {
    method createTable (line 43) | private static void createTable(Properties props, String tablename) th...
    method main (line 96) | public static void main(String[] args) {
    method JdbcDBCreateTable (line 221) | private JdbcDBCreateTable() {

FILE: jdbc/src/main/java/com/yahoo/ycsb/db/StatementType.java
  class StatementType (line 22) | public class StatementType {
    type Type (line 24) | enum Type {
      method Type (line 29) | private Type(int type) {
      method getHashCode (line 33) | int getHashCode() {
    method StatementType (line 47) | public StatementType(Type type, String tableName, int numFields, Strin...
    method getTableName (line 55) | public String getTableName() {
    method getFieldString (line 59) | public String getFieldString() {
    method getNumFields (line 63) | public int getNumFields() {
    method hashCode (line 67) | @Override
    method equals (line 77) | @Override

FILE: jdbc/src/main/java/com/yahoo/ycsb/db/flavors/DBFlavor.java
  class DBFlavor (line 25) | public abstract class DBFlavor {
    type DBName (line 27) | enum DBName {
    method DBFlavor (line 34) | public DBFlavor(DBName dbName) {
    method fromJdbcUrl (line 38) | public static DBFlavor fromJdbcUrl(String url) {
    method createInsertStatement (line 48) | public abstract String createInsertStatement(StatementType insertType,...
    method createReadStatement (line 53) | public abstract String createReadStatement(StatementType readType, Str...
    method createDeleteStatement (line 58) | public abstract String createDeleteStatement(StatementType deleteType,...
    method createUpdateStatement (line 63) | public abstract String createUpdateStatement(StatementType updateType,...
    method createScanStatement (line 68) | public abstract String createScanStatement(StatementType scanType, Str...

FILE: jdbc/src/main/java/com/yahoo/ycsb/db/flavors/DefaultDBFlavor.java
  class DefaultDBFlavor (line 25) | public class DefaultDBFlavor extends DBFlavor {
    method DefaultDBFlavor (line 26) | public DefaultDBFlavor() {
    method DefaultDBFlavor (line 29) | public DefaultDBFlavor(DBName dbName) {
    method createInsertStatement (line 33) | @Override
    method createReadStatement (line 46) | @Override
    method createDeleteStatement (line 57) | @Override
    method createUpdateStatement (line 67) | @Override
    method createScanStatement (line 86) | @Override

FILE: jdbc/src/main/java/com/yahoo/ycsb/db/flavors/PhoenixDBFlavor.java
  class PhoenixDBFlavor (line 25) | public class PhoenixDBFlavor extends DefaultDBFlavor {
    method PhoenixDBFlavor (line 26) | public PhoenixDBFlavor() {
    method createInsertStatement (line 30) | @Override
    method createUpdateStatement (line 44) | @Override

FILE: jdbc/src/main/resources/sql/create_table.sql
  type usertable (line 22) | CREATE TABLE usertable(YCSB_KEY VARCHAR PRIMARY KEY,

FILE: jdbc/src/test/java/com/yahoo/ycsb/db/JdbcDBClientTest.java
  class JdbcDBClientTest (line 35) | public class JdbcDBClientTest {
    method setup (line 49) | @BeforeClass
    method setupWithBatch (line 54) | public static void setupWithBatch(int batchSize, boolean autoCommit) {
    method teardown (line 78) | @AfterClass
    method prepareTest (line 97) | @Before
    method buildDeterministicValue (line 130) | private String buildDeterministicValue(String key, String fieldkey) {
    method insertRow (line 148) | private HashMap<String, ByteIterator> insertRow(String insertKey) {
    method insertTest (line 158) | @Test
    method updateTest (line 185) | @Test
    method readTest (line 247) | @Test
    method deleteTest (line 274) | @Test
    method scanTest (line 303) | @Test
    method insertBatchTest (line 332) | @Test
    method insertPartialBatchTest (line 337) | @Test
    method insertBatchTest (line 342) | public void insertBatchTest(int numRows) throws DBException {
    method assertNumRows (line 381) | private void assertNumRows(long numRows) throws SQLException {

FILE: kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java
  class KuduYCSBClient (line 66) | public class KuduYCSBClient extends com.yahoo.ycsb.DB {
    method init (line 84) | @Override
    method initClient (line 104) | private static synchronized void initClient(String tableName,
    method getIntFromProp (line 167) | private static int getIntFromProp(Properties prop,
    method cleanup (line 182) | @Override
    method read (line 191) | @Override
    method scan (line 206) | @Override
    method addAllRowsToResult (line 250) | private void addAllRowsToResult(RowResultIterator it,
    method update (line 273) | @Override
    method insert (line 289) | @Override
    method delete (line 301) | @Override
    method apply (line 310) | private void apply(Operation op) {

FILE: leveldb/src/main/java/com/yahoo/ycsb/db/LevelDbClient.java
  class LevelDbClient (line 40) | public class LevelDbClient extends DB {
    method getStringFromInputStream (line 59) | private static String getStringFromInputStream(InputStream is) {
    method init (line 86) | @Override
    method cleanup (line 96) | @Override
    method delete (line 110) | @Override
    method insert (line 142) | @Override
    method read (line 182) | @Override
    method update (line 222) | @Override
    method scan (line 279) | @Override

FILE: leveldbjni/src/main/java/com/yahoo/ycsb/db/LevelDbJniClient.java
  class LevelDbJniClient (line 32) | public class LevelDbJniClient extends DB {
    method getDBInstance (line 38) | private synchronized static void getDBInstance() {
    method mapToBytes (line 52) | private static byte[] mapToBytes(Map<String, String> map)
    method bytesToMap (line 60) | private static Map<String, String> bytesToMap(byte[] bytes)
    method init (line 73) | @Override
    method cleanup (line 83) | @Override
    method delete (line 105) | @Override
    method insert (line 125) | @Override
    method read (line 158) | @Override
    method update (line 195) | @Override
    method scan (line 249) | @Override

FILE: mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java
  class MapKeeperClient (line 44) | public class MapKeeperClient extends DB {
    method initDB (line 52) | private synchronized static void initDB(Properties p, MapKeeper.Client...
    method init (line 59) | public void init() {
    method encode (line 75) | ByteBuffer encode(HashMap<String, ByteIterator> values) {
    method decode (line 99) | void decode(Set<String> fields, String tups, HashMap<String, ByteItera...
    method ycsbThriftRet (line 114) | int ycsbThriftRet(BinaryResponse succ, ResponseCode zero, ResponseCode...
    method ycsbThriftRet (line 117) | int ycsbThriftRet(ResponseCode rc, ResponseCode zero, ResponseCode one) {
    method bufStr (line 122) | ByteBuffer bufStr(String str) {
    method strResponse (line 126) | String strResponse(BinaryResponse buf) {
    method read (line 130) | @Override
    method scan (line 153) | @Override
    method update (line 178) | @Override
    method insert (line 198) | @Override
    method delete (line 210) | @Override

FILE: memcached/src/main/java/com/yahoo/ycsb/db/MemcachedClient.java
  class MemcachedClient (line 60) | public class MemcachedClient extends DB {
    method memcachedClient (line 115) | protected net.spy.memcached.MemcachedClient memcachedClient() {
    method init (line 119) | @Override
    method createMemcachedClient (line 137) | protected net.spy.memcached.MemcachedClient createMemcachedClient()
    method read (line 180) | @Override
    method scan (line 198) | @Override
    method update (line 205) | @Override
    method insert (line 219) | @Override
    method delete (line 233) | @Override
    method getReturnCode (line 245) | protected Status getReturnCode(OperationFuture<Boolean> future) {
    method cleanup (line 259) | @Override
    method createQualifiedKey (line 266) | protected static String createQualifiedKey(String table, String key) {
    method fromJson (line 270) | protected static void fromJson(
    method toJson (line 290) | protected static String toJson(Map<String, ByteIterator> values)

FILE: mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java
  class AsyncMongoDbClient (line 66) | public class AsyncMongoDbClient extends DB {
    method initialValue (line 77) | @Override
    method cleanup (line 115) | @Override
    method delete (line 142) | @Override
    method init (line 163) | @Override
    method insert (line 252) | @Override
    method read (line 330) | @Override
    method scan (line 390) | @Override
    method update (line 451) | @Override
    method fillMap (line 480) | protected final void fillMap(final Map<String, ByteIterator> result,
    class BinaryByteArrayIterator (line 494) | private static final class BinaryByteArrayIterator extends ByteIterator {
      method BinaryByteArrayIterator (line 508) | public BinaryByteArrayIterator(final BinaryElement element) {
      method bytesLeft (line 519) | @Override
      method hasNext (line 531) | @Override
      method nextByte (line 542) | @Override

FILE: mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java
  class MongoDbClient (line 69) | public class MongoDbClient extends DB {
    method cleanup (line 118) | @Override
    method delete (line 145) | @Override
    method init (line 168) | @Override
    method insert (line 252) | @Override
    method read (line 316) | @Override
    method scan (line 363) | @Override
    method update (line 429) | @Override
    method fillMap (line 462) | protected void fillMap(Map<String, ByteIterator> resultMap, Document o...

FILE: mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java
  class OptionsSupport (line 26) | public final class OptionsSupport {
    method updateUrl (line 41) | public static String updateUrl(String url, Properties props) {
    method addUrlOption (line 128) | private static String addUrlOption(String url, String name, String val...
    method OptionsSupport (line 142) | private OptionsSupport() {

FILE: mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java
  class AbstractDBTestCases (line 52) | @SuppressWarnings("boxing")
    method setUpBeforeClass (line 62) | @BeforeClass
    method testInsertReadDelete (line 88) | @Test
    method testInsertReadUpdate (line 137) | @Test
    method testInsertReadUpdateWithUpsert (line 198) | @Test
    method testScan (line 261) | @Test
    method getDB (line 312) | protected DB getDB() {
    method getDB (line 323) | protected abstract DB getDB(Properties props);
    method padded (line 332) | private String padded(int i) {

FILE: mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java
  class AsyncMongoDbClientTest (line 24) | public class AsyncMongoDbClientTest extends MongoDbClientTest {
    method instantiateClient (line 26) | @Override

FILE: mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java
  class MongoDbClientTest (line 30) | public class MongoDbClientTest extends AbstractDBTestCases {
    method instantiateClient (line 35) | protected DB instantiateClient() {
    method tearDown (line 42) | @After
    method getDB (line 59) | @Override

FILE: mongodb/src/test/java/com/yahoo/ycsb/db/OptionsSupportTest.java
  class OptionsSupportTest (line 32) | public class OptionsSupportTest {
    method testUpdateUrlMaxConnections (line 38) | @Test
    method testUpdateUrlWaitQueueMultiple (line 61) | @Test
    method testUpdateUrlWriteConcern (line 89) | @Test
    method testUpdateUrlReadPreference (line 132) | @Test
    method props (line 176) | private Properties props(String key, String value) {

FILE: nosqldb/src/main/java/com/yahoo/ycsb/db/NoSqlDbClient.java
  class NoSqlDbClient (line 50) | public class NoSqlDbClient extends DB {
    method getPropertyInt (line 54) | private int getPropertyInt(Properties properties, String key,
    method init (line 68) | @Override
    method cleanup (line 152) | @Override
    method createKey (line 163) | private static Key createKey(String table, String key, String field) {
    method createKey (line 174) | private static Key createKey(String table, String key) {
    method getFieldFromKey (line 178) | private static String getFieldFromKey(Key key) {
    method read (line 182) | @Override
    method scan (line 206) | @Override
    method update (line 213) | @Override
    method insert (line 229) | @Override
    method delete (line 234) | @Override

FILE: orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java
  class OrientDBClient (line 45) | public class OrientDBClient extends DB {
    method init (line 78) | public void init() throws DBException {
    method getDatabasePool (line 177) | OPartitionedDatabasePool getDatabasePool() {
    method cleanup (line 181) | @Override
    method insert (line 198) | @Override
    method delete (line 218) | @Override
    method read (line 234) | @Override
    method update (line 257) | @Override
    method scan (line 280) | @Override

FILE: orientdb/src/test/java/com/yahoo/ycsb/db/OrientDBClientTest.java
  class OrientDBClientTest (line 38) | public class OrientDBClientTest {
    method setup (line 49) | @Before
    method teardown (line 61) | @After
    method buildDeterministicValue (line 72) | private String buildDeterministicValue(String key, String fieldkey) {
    method insertRow (line 90) | private Map<String, ByteIterator> insertRow(String insertKey) {
    method insertTest (line 100) | @Test
    method updateTest (line 119) | @Test
    method readTest (line 171) | @Test
    method deleteTest (line 198) | @Test
    method scanTest (line 220) | @Test

FILE: rados/src/main/java/com/yahoo/ycsb/db/RadosClient.java
  class RadosClient (line 48) | public class RadosClient extends DB {
    method init (line 62) | public void init() throws DBException {
    method cleanup (line 97) | public void cleanup() throws DBException {
    method read (line 105) | @Override
    method insert (line 140) | @Override
    method delete (line 155) | @Override
    method update (line 165) | @Override
    method scan (line 174) | @Override

FILE: rados/src/test/java/com/yahoo/ycsb/db/RadosClientTest.java
  class RadosClientTest (line 48) | public class RadosClientTest {
    method setupClass (line 72) | @BeforeClass
    method teardownClass (line 88) | @AfterClass
    method setUp (line 95) | @Before
    method tearDown (line 100) | @After
    method insertTest (line 105) | @Test
    method updateTest (line 111) | @Test
    method readTest (line 125) | @Test
    method compareMap (line 133) | private void compareMap(HashMap<String, ByteIterator> src, HashMap<Str...
    method deleteTest (line 144) | @Test

FILE: redis/src/main/java/com/yahoo/ycsb/db/RedisClient.java
  class RedisClient (line 49) | public class RedisClient extends DB {
    method init (line 59) | public void init() throws DBException {
    method cleanup (line 80) | public void cleanup() throws DBException {
    method hash (line 90) | private double hash(String key) {
    method read (line 96) | @Override
    method insert (line 118) | @Override
    method delete (line 129) | @Override
    method update (line 135) | @Override
    method scan (line 142) | @Override

FILE: rest/src/main/java/com/yahoo/ycsb/webservice/rest/RestClient.java
  class RestClient (line 61) | public class RestClient extends DB {
    method init (line 81) | @Override
    method setupClient (line 95) | private void setupClient() {
    method read (line 104) | @Override
    method insert (line 119) | @Override
    method delete (line 134) | @Override
    method update (line 149) | @Override
    method scan (line 164) | @Override
    method getStatus (line 171) | private Status getStatus(int responseCode) {
    method handleExceptions (line 189) | private int handleExceptions(Exception e, String url, String method) {
    method httpGet (line 203) | private int httpGet(String endpoint, Map<String, ByteIterator> result)...
    method httpExecute (line 250) | private int httpExecute(HttpEntityEnclosingRequestBase request, String...
    method httpDelete (line 296) | private int httpDelete(String endpoint) throws IOException {
    class Timer (line 315) | class Timer implements Runnable {
      method Timer (line 320) | public Timer(long timeout, Criteria timedout) {
      method run (line 325) | @Override
    class Criteria (line 340) | class Criteria {
      method Criteria (line 344) | public Criteria(boolean isSatisfied) {
      method isSatisfied (line 348) | public boolean isSatisfied() {
      method setIsSatisfied (line 352) | public void setIsSatisfied(boolean satisfied) {
    class TimeoutException (line 361) | class TimeoutException extends RuntimeException {
      method TimeoutException (line 365) | public TimeoutException() {

FILE: rest/src/test/java/com/yahoo/ycsb/webservice/rest/IntegrationTest.java
  class IntegrationTest (line 57) | @FixMethodOrder(MethodSorters.NAME_ASCENDING)
    method init (line 70) | @BeforeClass
    method cleanUp (line 87) | @AfterClass
    method testReadOpsBenchmarkSuccess (line 93) | @Test
    method testReadOpsBenchmarkFailure (line 108) | @Test
    method testInsertOpsBenchmarkSuccess (line 123) | @Test
    method testInsertOpsBenchmarkFailure (line 138) | @Test
    method testUpdateOpsBenchmarkSuccess (line 153) | @Test
    method testUpdateOpsBenchmarkFailure (line 168) | @Test
    method testDeleteOpsBenchmarkSuccess (line 183) | @Test
    method testDeleteOpsBenchmarkFailure (line 198) | @Test
    method getArgs (line 212) | private String[] getArgs(String traceFilePath, float rp, float ip, flo...
    method resourceConfig (line 242) | private static ServletContainer resourceConfig() {

FILE: rest/src/test/java/com/yahoo/ycsb/webservice/rest/ResourceLoader.java
  class ResourceLoader (line 29) | public class ResourceLoader extends Application {
    method getClasses (line 31) | @Override

FILE: rest/src/test/java/com/yahoo/ycsb/webservice/rest/RestClientTest.java
  class RestClientTest (line 54) | public class RestClientTest {
    method init (line 67) | @BeforeClass
    method cleanUp (line 89) | @AfterClass
    method read_200 (line 95) | @Test
    method read_403 (line 104) | @Test
    method read_404 (line 112) | @Test
    method read_500 (line 120) | @Test
    method insert_200 (line 128) | @Test
    method insert_403 (line 136) | @Test
    method insert_404 (line 144) | @Test
    method insert_500 (line 152) | @Test
    method delete_200 (line 161) | @Test
    method delete_403 (line 167) | @Test
    method delete_404 (line 173) | @Test
    method delete_500 (line 179) | @Test
    method update_200 (line 185) | @Test
    method update_403 (line 193) | @Test
    method update_404 (line 201) | @Test
    method update_500 (line 209) | @Test
    method scan (line 217) | @Test
    method resourceConfig (line 222) | private static ServletContainer resourceConfig() {

FILE: rest/src/test/java/com/yahoo/ycsb/webservice/rest/RestTestResource.java
  class RestTestResource (line 35) | @Path("/resource/{id}")
    method respondToGET (line 38) | @GET
    method respondToPOST (line 44) | @POST
    method respondToDELETE (line 50) | @DELETE
    method respondToPUT (line 56) | @PUT
    method processRequests (line 62) | private static Response processRequests(String id, String method) {

FILE: rest/src/test/java/com/yahoo/ycsb/webservice/rest/Utils.java
  class Utils (line 32) | public class Utils {
    method available (line 40) | public static boolean available(int port) {
    method read (line 65) | public static List<String> read(String filepath) {
    method delete (line 80) | public static void delete(String filepath) {

FILE: riak/src/main/java/com/yahoo/ycsb/db/riak/RiakKVClient.java
  class RiakKVClient (line 54) | public class RiakKVClient extends DB {
    method loadDefaultProperties (line 86) | private void loadDefaultProperties() {
    method loadProperties (line 109) | private void loadProperties() {
    method init (line 172) | public void init() throws DBException {
    method read (line 230) | @Override
    method scan (line 279) | @Override
    method fetch (line 368) | private FetchValue.Response fetch(FetchValue fv) throws TimeoutExcepti...
    method insert (line 406) | @Override
    class UpdateEntity (line 472) | private static final class UpdateEntity extends UpdateValue.Update<Ria...
      method UpdateEntity (line 475) | private UpdateEntity(RiakObject object) {
      method apply (line 480) | @Override
    method update (line 495) | @Override
    method delete (line 542) | @Override
    method cleanup (line 568) | public void cleanup() throws DBException {
    method setTestEnvironment (line 585) | void setTestEnvironment(String bucket) throws Exception {

FILE: riak/src/main/java/com/yahoo/ycsb/db/riak/RiakUtils.java
  class RiakUtils (line 36) | final class RiakUtils {
    method RiakUtils (line 38) | private RiakUtils() {
    method toBytes (line 42) | private static byte[] toBytes(final int anInteger) {
    method fromBytes (line 53) | private static int fromBytes(final byte[] aByteArray) {
    method close (line 59) | private static void close(final OutputStream anOutputStream) {
    method close (line 67) | private static void close(final InputStream anInputStream) {
    method serializeTable (line 81) | static byte[] serializeTable(Map<String, ByteIterator> aTable) {
    method deserializeTable (line 111) | private static void deserializeTable(final byte[] aValue, final Map<St...
    method getKeyAsLong (line 144) | static Long getKeyAsLong(String key) {
    method createResultHashMap (line 158) | static void createResultHashMap(Set<String> fields, FetchValue.Respons...

FILE: riak/src/test/java/com/yahoo/ycsb/db/riak/RiakKVClientTest.java
  class RiakKVClientTest (line 39) | public class RiakKVClientTest {
    method setUpClass (line 55) | @BeforeClass
    method tearDownClass (line 83) | @AfterClass
    method testRead (line 99) | @Test
    method testScan (line 133) | @Test
    method testUpdate (line 159) | @Test
    method testInsert (line 201) | @Test
    method testDelete (line 226) | @Test
    method delete (line 251) | private static Status delete(String key) {
    method createExpectedHashMap (line 255) | private static HashMap<String, String> createExpectedHashMap(int value) {

FILE: rocksdb/src/main/java/RocksdbClient.java
  class RocksdbClient (line 14) | public class RocksdbClient extends DB {
    method init (line 28) | public void init() throws DBException {
    method cleanup (line 47) | public void cleanup() throws DBException {
    method read (line 79) | @Override
    method scan (line 92) | @Override
    method update (line 99) | @Override
    method insert (line 111) | @Override
    method delete (line 123) | @Override
    method serialize (line 134) | private byte[] serialize(Map<String, ByteIterator> values) {
    method deserialize (line 154) | private HashMap<String, ByteIterator> deserialize(byte[] bytes) {

FILE: s3/src/main/java/com/yahoo/ycsb/db/S3Client.java
  class S3Client (line 76) | public class S3Client extends DB {
    method cleanup (line 87) | @Override
    method delete (line 113) | @Override
    method init (line 128) | @Override
    method insert (line 260) | @Override
    method read (line 280) | @Override
    method update (line 298) | @Override
    method scan (line 320) | @Override
    method writeToStorage (line 339) | protected Status writeToStorage(String bucket, String key,
    method readFromStorage (line 425) | protected Status readFromStorage(String bucket, String key,
    method getS3ObjectAndMetadata (line 443) | private Map.Entry<S3Object, ObjectMetadata> getS3ObjectAndMetadata(Str...
    method scanFromStorage (line 478) | protected Status scanFromStorage(String bucket, String startkey,

FILE: solr/src/main/java/com/yahoo/ycsb/db/solr/SolrClient.java
  class SolrClient (line 53) | public class SolrClient extends DB {
    method init (line 69) | @Override
    method cleanup (line 96) | @Override
    method insert (line 118) | @Override
    method delete (line 152) | @Override
    method read (line 183) | @Override
    method update (line 227) | @Override
    method scan (line 268) | @Override
    method checkStatus (line 304) | private Status checkStatus(int status) {

FILE: solr/src/test/java/com/yahoo/ycsb/db/solr/SolrClientBaseTest.java
  class SolrClientBaseTest (line 41) | public abstract class SolrClientBaseTest {
    method onlyOnce (line 58) | @BeforeClass
    method destroy (line 70) | @AfterClass
    method setup (line 77) | @Before
    method tearDown (line 86) | @After
    method testInsert (line 95) | @Test
    method testDelete (line 101) | @Test
    method testRead (line 107) | @Test
    method testUpdate (line 115) | @Test
    method testScan (line 135) | @Test
    method getDB (line 148) | protected DB getDB() {
    method getDB (line 159) | protected abstract DB getDB(Properties props);

FILE: solr/src/test/java/com/yahoo/ycsb/db/solr/SolrClientCloudTest.java
  class SolrClientCloudTest (line 26) | public class SolrClientCloudTest extends SolrClientBaseTest {
    method tearDown (line 30) | @After
    method getDB (line 41) | @Override

FILE: solr/src/test/java/com/yahoo/ycsb/db/solr/SolrClientTest.java
  class SolrClientTest (line 27) | public class SolrClientTest extends SolrClientBaseTest {
    method tearDown (line 31) | @After
    method getDB (line 42) | @Override

FILE: solr6/src/main/java/com/yahoo/ycsb/db/solr6/SolrClient.java
  class SolrClient (line 53) | public class SolrClient extends DB {
    method init (line 69) | @Override
    method cleanup (line 95) | @Override
    method insert (line 117) | @Override
    method delete (line 151) | @Override
    method read (line 182) | @Override
    method update (line 226) | @Override
    method scan (line 267) | @Override
    method checkStatus (line 303) | private Status checkStatus(int status) {

FILE: solr6/src/test/java/com/yahoo/ycsb/db/solr6/SolrClientBaseTest.java
  class SolrClientBaseTest (line 41) | public abstract class SolrClientBaseTest {
    method onlyOnce (line 58) | @BeforeClass
    method destroy (line 70) | @AfterClass
    method setup (line 77) | @Before
    method tearDown (line 86) | @After
    method testInsert (line 95) | @Test
    method testDelete (line 101) | @Test
    method testRead (line 107) | @Test
    method testUpdate (line 115) | @Test
    method testScan (line 135) | @Test
    method getDB (line 148) | protected DB getDB() {
    method getDB (line 159) | protected abstract DB getDB(Properties props);

FILE: solr6/src/test/java/com/yahoo/ycsb/db/solr6/SolrClientCloudTest.java
  class SolrClientCloudTest (line 26) | public class SolrClientCloudTest extends SolrClientBaseTest {
    method tearDown (line 30) | @After
    method getDB (line 41) | @Override

FILE: solr6/src/test/java/com/yahoo/ycsb/db/solr6/SolrClientTest.java
  class SolrClientTest (line 27) | public class SolrClientTest extends SolrClientBaseTest {
    method tearDown (line 31) | @After
    method getDB (line 42) | @Override

FILE: tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java
  class TarantoolClient (line 31) | public class TarantoolClient extends DB {
    method init (line 44) | public void init() throws DBException {
    method cleanup (line 58) | public void cleanup() throws DBException {
    method insert (line 62) | @Override
    method tupleConvertFilter (line 67) | private HashMap<String, ByteIterator> tupleConvertFilter(List<String> ...
    method read (line 80) | @Override
    method scan (line 94) | @Override
    method delete (line 116) | @Override
    method update (line 129) | @Override
    method replace (line 134) | private Status replace(String key, Map<String, ByteIterator> values, S...

FILE: voldemort/src/main/java/com/yahoo/ycsb/db/VoldemortClient.java
  class VoldemortClient (line 43) | public class VoldemortClient extends DB {
    method init (line 56) | public void init() throws DBException {
    method cleanup (line 70) | public void cleanup() throws DBException {
    method delete (line 74) | @Override
    method insert (line 86) | @Override
    method read (line 97) | @Override
    method scan (line 124) | @Override
    method update (line 131) | @Override
    method checkStore (line 156) | private Status checkStore(String table) {
Condensed preview — 384 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,791K chars).
[
  {
    "path": ".editorconfig",
    "chars": 283,
    "preview": "# For more info, see: http://EditorConfig.org\nroot = true\n\n[*.java]\nindent_style = space\nindent_size = 2\ncontinuation_in"
  },
  {
    "path": ".gitignore",
    "chars": 315,
    "preview": "# ignore compiled byte code\ntarget\n\n# ignore output files from testing\noutput*\n\n# ignore standard Eclipse files\n.project"
  },
  {
    "path": ".travis.yml",
    "chars": 1140,
    "preview": "# Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors. \n# All rights reserved.\n#\n# Licensed under the Apache L"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 10480,
    "preview": "<!--\nCopyright (c) 2017 YCSB contributors.\nAll rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "LICENSE.txt",
    "chars": 11358,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "NOTICE.txt",
    "chars": 615,
    "preview": "=========================================================================\nNOTICE file for use with, and corresponding to"
  },
  {
    "path": "README.md",
    "chars": 3180,
    "preview": "\n# ByteIterator\n\n从数据库取数据,我使用了ByteIterator数据接口,其例子和好处如下。\n\n代码示例:\n\n\n```Java\n  @Override\n  public Status read(String table, "
  },
  {
    "path": "Todo.md",
    "chars": 648,
    "preview": "  @Override\n  public Status read(String table, String key, Set<String> fields, Map<String, ByteIterator> result) {\n    t"
  },
  {
    "path": "accumulo1.6/README.md",
    "chars": 4938,
    "preview": "<!--\nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "accumulo1.6/pom.xml",
    "chars": 3116,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2011 YCSB++ project, 2014 - 2016 YCSB contributors.\nAll right"
  },
  {
    "path": "accumulo1.6/src/main/conf/accumulo.properties",
    "chars": 1598,
    "preview": "# Copyright 2014 Cloudera, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2"
  },
  {
    "path": "accumulo1.6/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java",
    "chars": 12856,
    "preview": "/**\n * Copyright (c) 2011 YCSB++ project, 2014-2016 YCSB contributors.\n * All rights reserved.\n *\n * Licensed under the "
  },
  {
    "path": "accumulo1.6/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java",
    "chars": 784,
    "preview": "/**\n * Copyright (c) 2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "accumulo1.6/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java",
    "chars": 7608,
    "preview": "/*\n * Copyright (c) 2016 YCSB contributors.\n * All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "accumulo1.6/src/test/resources/log4j.properties",
    "chars": 1096,
    "preview": "#\n# Copyright (c) 2015 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "accumulo1.7/README.md",
    "chars": 4938,
    "preview": "<!--\nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "accumulo1.7/pom.xml",
    "chars": 3116,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2011 YCSB++ project, 2014 - 2016 YCSB contributors.\nAll right"
  },
  {
    "path": "accumulo1.7/src/main/conf/accumulo.properties",
    "chars": 1598,
    "preview": "# Copyright 2014 Cloudera, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2"
  },
  {
    "path": "accumulo1.7/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java",
    "chars": 12969,
    "preview": "/**\n * Copyright (c) 2011 YCSB++ project, 2014-2016 YCSB contributors.\n * All rights reserved.\n *\n * Licensed under the "
  },
  {
    "path": "accumulo1.7/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java",
    "chars": 784,
    "preview": "/**\n * Copyright (c) 2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "accumulo1.7/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java",
    "chars": 7608,
    "preview": "/*\n * Copyright (c) 2016 YCSB contributors.\n * All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "accumulo1.7/src/test/resources/log4j.properties",
    "chars": 1097,
    "preview": "#\n# Copyright (c) 2015 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "accumulo1.8/README.md",
    "chars": 4938,
    "preview": "<!--\nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "accumulo1.8/pom.xml",
    "chars": 3116,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2011 YCSB++ project, 2014 - 2016 YCSB contributors.\nAll right"
  },
  {
    "path": "accumulo1.8/src/main/conf/accumulo.properties",
    "chars": 1598,
    "preview": "# Copyright 2014 Cloudera, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2"
  },
  {
    "path": "accumulo1.8/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java",
    "chars": 12969,
    "preview": "/**\n * Copyright (c) 2011 YCSB++ project, 2014-2016 YCSB contributors.\n * All rights reserved.\n *\n * Licensed under the "
  },
  {
    "path": "accumulo1.8/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java",
    "chars": 784,
    "preview": "/**\n * Copyright (c) 2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "accumulo1.8/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java",
    "chars": 7608,
    "preview": "/*\n * Copyright (c) 2016 YCSB contributors.\n * All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "accumulo1.8/src/test/resources/log4j.properties",
    "chars": 1097,
    "preview": "#\n# Copyright (c) 2015 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "aerospike/README.md",
    "chars": 1817,
    "preview": "<!--\nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "aerospike/pom.xml",
    "chars": 1611,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2015-2016 YCSB contributors. All rights reserved.\n\nLicensed u"
  },
  {
    "path": "aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java",
    "chars": 5820,
    "preview": "/**\n * Copyright (c) 2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "aerospike/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 765,
    "preview": "/**\n * Copyright (c) 2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "arangodb/.gitignore",
    "chars": 6,
    "preview": "/bin/\n"
  },
  {
    "path": "arangodb/README.md",
    "chars": 2559,
    "preview": "<!--\nCopyright (c) 2012 - 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "arangodb/conf/logback.xml",
    "chars": 1046,
    "preview": "<!-- \nCopyright (c) 2012 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "arangodb/pom.xml",
    "chars": 2297,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n\nLicensed"
  },
  {
    "path": "arangodb/src/main/java/com/yahoo/ycsb/db/ArangoDBClient.java",
    "chars": 17128,
    "preview": "/**\n * Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Versio"
  },
  {
    "path": "arangodb/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 776,
    "preview": "/**\n * Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Versio"
  },
  {
    "path": "arangodb3/.gitignore",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "arangodb3/README.md",
    "chars": 2554,
    "preview": "<!--\nCopyright (c) 2017 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "arangodb3/conf/logback.xml",
    "chars": 1046,
    "preview": "<!-- \nCopyright (c) 2017 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "arangodb3/pom.xml",
    "chars": 2293,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2017 YCSB contributors. All rights reserved.\n\nLicensed under "
  },
  {
    "path": "arangodb3/src/main/java/com/yahoo/ycsb/db/arangodb/ArangoDB3Client.java",
    "chars": 15545,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "arangodb3/src/main/java/com/yahoo/ycsb/db/arangodb/package-info.java",
    "chars": 778,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "asynchbase/README.md",
    "chars": 3140,
    "preview": "<!--\nCopyright (c) 2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "asynchbase/pom.xml",
    "chars": 4062,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nCopyright (c) 2016 YCSB contributors. All rights reserved.\nLicensed under th"
  },
  {
    "path": "asynchbase/src/main/java/com/yahoo/ycsb/db/AsyncHBaseClient.java",
    "chars": 14375,
    "preview": "/**\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "asynchbase/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 754,
    "preview": "/**\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "asynchbase/src/test/java/com/google/common/base/Stopwatch.java",
    "chars": 8248,
    "preview": "/*\n * Copyright (C) 2008 The Guava Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "asynchbase/src/test/java/com/google/common/io/Closeables.java",
    "chars": 3295,
    "preview": "/*\n * Copyright (C) 2007 The Guava Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "asynchbase/src/test/java/com/google/common/io/LimitInputStream.java",
    "chars": 2639,
    "preview": "/*\n * Copyright (C) 2007 The Guava Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "asynchbase/src/test/java/com/yahoo/ycsb/db/AsyncHBaseTest.java",
    "chars": 7026,
    "preview": "/**\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "asynchbase/src/test/resources/hbase-site.xml",
    "chars": 1143,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nCopyright (c) 2016 YCSB contributors. All rights reserved.\n\nLicensed under t"
  },
  {
    "path": "asynchbase/src/test/resources/log4j.properties",
    "chars": 1114,
    "preview": "#\n# Copyright (c) 2015 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "azuredocumentdb/pom.xml",
    "chars": 1598,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nCopyright (c) 2016 YCSB contributors. All rights reserved.\n\nLicensed under t"
  },
  {
    "path": "azuredocumentdb/src/main/java/com/yahoo/ycsb/db/azuredocumentdb/AzureDocumentDBClient.java",
    "chars": 8236,
    "preview": "/*\n * Copyright 2016 YCSB Contributors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "azuredocumentdb/src/main/java/com/yahoo/ycsb/db/azuredocumentdb/package-info.java",
    "chars": 748,
    "preview": "/*\n * Copyright 2016 YCSB Contributors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "azuretablestorage/README.md",
    "chars": 2288,
    "preview": "<!--\nCopyright (c) 2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "azuretablestorage/pom.xml",
    "chars": 1712,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2016 YCSB contributors. All rights reserved.\n\nLicensed under "
  },
  {
    "path": "azuretablestorage/src/main/java/com/yahoo/ycsb/db/azuretablestorage/AzureClient.java",
    "chars": 10860,
    "preview": "/**\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "azuretablestorage/src/main/java/com/yahoo/ycsb/db/azuretablestorage/package-info.java",
    "chars": 823,
    "preview": "/*\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "bin/bindings.properties",
    "chars": 3121,
    "preview": "#\n# Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "bin/ycsb",
    "chars": 13502,
    "preview": "#!/usr/bin/env python\n#\n# Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apach"
  },
  {
    "path": "bin/ycsb.bat",
    "chars": 6808,
    "preview": "@REM\r\n@REM Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\r\n@REM\r\n@REM Licensed under the Apache Licen"
  },
  {
    "path": "bin/ycsb.sh",
    "chars": 7806,
    "preview": "#!/bin/sh\n#\n# Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, V"
  },
  {
    "path": "binding-parent/datastore-specific-descriptor/pom.xml",
    "chars": 1538,
    "preview": "<!-- \nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "binding-parent/datastore-specific-descriptor/src/main/resources/assemblies/datastore-specific-assembly.xml",
    "chars": 2702,
    "preview": "<!-- \nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "binding-parent/pom.xml",
    "chars": 4733,
    "preview": "<!-- \nCopyright (c) 2015-2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "cassandra/README.md",
    "chars": 3296,
    "preview": "<!--\nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "cassandra/pom.xml",
    "chars": 4809,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\nCopyright (c) 2012-2016 YCSB contributors. All rights reserved.\n\nLicensed u"
  },
  {
    "path": "cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java",
    "chars": 15949,
    "preview": "/**\n * Copyright (c) 2013-2015 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version "
  },
  {
    "path": "cassandra/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 784,
    "preview": "/*\n * Copyright (c) 2014, Yahoo!, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "cassandra/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java",
    "chars": 6140,
    "preview": "/**\n * Copyright (c) 2015 YCSB contributors All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "cassandra/src/test/resources/ycsb.cql",
    "chars": 893,
    "preview": "/**\n * Copyright (c) 2015 YCSB Contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "checkstyle.xml",
    "chars": 7390,
    "preview": "<?xml version=\"1.0\"?>\n<!-- \nCopyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache"
  },
  {
    "path": "cloudspanner/README.md",
    "chars": 6132,
    "preview": "<!--\nCopyright (c) 2017 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "cloudspanner/conf/cloudspanner.properties",
    "chars": 895,
    "preview": "# Copyright (c) 2017 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "cloudspanner/pom.xml",
    "chars": 1846,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nCopyright (c) 2017 YCSB contributors. All rights reserved.\n\nLicensed under t"
  },
  {
    "path": "cloudspanner/src/main/java/com/yahoo/ycsb/db/cloudspanner/CloudSpannerClient.java",
    "chars": 14712,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "cloudspanner/src/main/java/com/yahoo/ycsb/db/cloudspanner/package-info.java",
    "chars": 806,
    "preview": "/*\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "core/CHANGES.md",
    "chars": 4489,
    "preview": "<!--\nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "core/pom.xml",
    "chars": 2277,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n\nLicensed"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/BasicDB.java",
    "chars": 12744,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/BasicTSDB.java",
    "chars": 9116,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2."
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/ByteArrayByteIterator.java",
    "chars": 1532,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/ByteIterator.java",
    "chars": 3421,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/Client.java",
    "chars": 37877,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/CommandLine.java",
    "chars": 11056,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2.0 (the"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/DB.java",
    "chars": 5207,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/DBException.java",
    "chars": 1181,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/DBFactory.java",
    "chars": 1402,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/DBWrapper.java",
    "chars": 9166,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc., 2016-2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/GoodBadUglyDB.java",
    "chars": 5557,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2.0 (the"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/InputStreamByteIterator.java",
    "chars": 1938,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/NumericByteIterator.java",
    "chars": 2007,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java",
    "chars": 2503,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/Status.java",
    "chars": 3546,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/StringByteIterator.java",
    "chars": 3293,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/TerminatorThread.java",
    "chars": 2388,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/UnknownDBException.java",
    "chars": 1190,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/Utils.java",
    "chars": 7932,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc., 2016 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache "
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/Workload.java",
    "chars": 5493,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n *\n * Licensed under the Apache "
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/WorkloadException.java",
    "chars": 1191,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/AcknowledgedCounterGenerator.java",
    "chars": 2643,
    "preview": "/**\n * Copyright (c) 2015-2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Vers"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/ConstantIntegerGenerator.java",
    "chars": 1156,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java",
    "chars": 1390,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc., Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed und"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/DiscreteGenerator.java",
    "chars": 2338,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/ExponentialGenerator.java",
    "chars": 3054,
    "preview": "/**\n * Copyright (c) 2011-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/FileGenerator.java",
    "chars": 1968,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/Generator.java",
    "chars": 1608,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/HistogramGenerator.java",
    "chars": 3173,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/HotspotIntegerGenerator.java",
    "chars": 3969,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc. Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed unde"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/IncrementingPrintableStringGenerator.java",
    "chars": 15073,
    "preview": "/**\n * Copyright (c) 2016-2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Vers"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/NumberGenerator.java",
    "chars": 1380,
    "preview": "/**\r\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\r\n * <p>\r\n * Licensed under the"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/RandomDiscreteTimestampGenerator.java",
    "chars": 4826,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/ScrambledZipfianGenerator.java",
    "chars": 4895,
    "preview": "/**\r\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\r\n * <p>\r\n * Licensed under the"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/SequentialGenerator.java",
    "chars": 1938,
    "preview": "/**\n * Copyright (c) 2016-2017 YCSB Contributors All rights reserved.\n * <p>\n * Licensed under the Apache License, Versi"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/SkewedLatestGenerator.java",
    "chars": 1851,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Ap"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/UniformGenerator.java",
    "chars": 1976,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc. Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed unde"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/UniformLongGenerator.java",
    "chars": 1677,
    "preview": "/**\r\n * Copyright (c) 2010 Yahoo! Inc. Copyright (c) 2017 YCSB contributors. All rights reserved.\r\n * <p>\r\n * Licensed u"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/UnixEpochTimestampGenerator.java",
    "chars": 6656,
    "preview": "/**\n * Copyright (c) 2016-2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Vers"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java",
    "chars": 12010,
    "preview": "/**\r\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.\r\n * <p>\r\n * Licensed under the"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/generator/package-info.java",
    "chars": 732,
    "preview": "/*\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java",
    "chars": 8931,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java",
    "chars": 2460,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java",
    "chars": 7670,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java",
    "chars": 4642,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementRaw.java",
    "chars": 6705,
    "preview": "/**\n * Copyright (c) 2015-2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apache License, Versi"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java",
    "chars": 3987,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java",
    "chars": 2342,
    "preview": "/**\r\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\r\n * <p>\r\n * Licensed under the "
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONArrayMeasurementsExporter.java",
    "chars": 2453,
    "preview": "/**\n * Copyright (c) 2015-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONMeasurementsExporter.java",
    "chars": 2372,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/exporter/MeasurementsExporter.java",
    "chars": 2056,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/exporter/TextMeasurementsExporter.java",
    "chars": 1755,
    "preview": "/**\n * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apa"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/exporter/package-info.java",
    "chars": 756,
    "preview": "/*\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/measurements/package-info.java",
    "chars": 738,
    "preview": "/*\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/package-info.java",
    "chars": 724,
    "preview": "/*\n * Copyright (c) 2015 - 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/workloads/ConstantOccupancyWorkload.java",
    "chars": 3649,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2.0 (the"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java",
    "chars": 31106,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc., Copyright (c) 2016-2017 YCSB contributors. All rights reserved.\n * <p>\n * License"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/workloads/RestWorkload.java",
    "chars": 13429,
    "preview": "/**\r\n * Copyright (c) 2016-2017 YCSB contributors. All rights reserved.\r\n * <p>\r\n * Licensed under the Apache License, V"
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/workloads/TimeSeriesWorkload.java",
    "chars": 55414,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2."
  },
  {
    "path": "core/src/main/java/com/yahoo/ycsb/workloads/package-info.java",
    "chars": 731,
    "preview": "/*\n * Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version"
  },
  {
    "path": "core/src/main/resources/project.properties",
    "chars": 27,
    "preview": "version=${project.version}\n"
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/TestByteIterator.java",
    "chars": 1288,
    "preview": "/**\n * Copyright (c) 2012 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/TestNumericByteIterator.java",
    "chars": 3940,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/TestStatus.java",
    "chars": 1323,
    "preview": "/**\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/TestUtils.java",
    "chars": 5611,
    "preview": "/**\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/generator/AcknowledgedCounterGeneratorTest.java",
    "chars": 1840,
    "preview": "/**\n * Copyright (c) 2015-2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version "
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/generator/TestIncrementingPrintableStringGenerator.java",
    "chars": 4193,
    "preview": "/**\n * Copyright (c) 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/generator/TestRandomDiscreteTimestampGenerator.java",
    "chars": 2587,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2"
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/generator/TestUnixEpochTimestampGenerator.java",
    "chars": 7818,
    "preview": "/**                                                                                                                     "
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java",
    "chars": 1155,
    "preview": "/**\n * Copyright (c) 2010 Yahoo! Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/measurements/exporter/TestMeasurementsExporter.java",
    "chars": 2284,
    "preview": "/**\n * Copyright (c) 2015 Yahoo! Inc. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2.0 (the"
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/workloads/TestCoreWorkload.java",
    "chars": 4267,
    "preview": "/**                                                                                                                     "
  },
  {
    "path": "core/src/test/java/com/yahoo/ycsb/workloads/TestTimeSeriesWorkload.java",
    "chars": 20134,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2."
  },
  {
    "path": "couchbase/README.md",
    "chars": 3183,
    "preview": "<!--\nCopyright (c) 2015 - 2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "couchbase/pom.xml",
    "chars": 2047,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2015-2016 YCSB contributors. All rights reserved.\n\nLicensed u"
  },
  {
    "path": "couchbase/src/main/java/com/yahoo/ycsb/db/CouchbaseClient.java",
    "chars": 11896,
    "preview": "/**\n * Copyright (c) 2013 - 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Versio"
  },
  {
    "path": "couchbase/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 776,
    "preview": "/*\n * Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version"
  },
  {
    "path": "couchbase2/README.md",
    "chars": 8287,
    "preview": "<!--\nCopyright (c) 2015 - 2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "couchbase2/pom.xml",
    "chars": 1731,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nCopyright (c) 2015 YCSB contributors. All rights reserved.\n\nLicensed under t"
  },
  {
    "path": "couchbase2/src/main/java/com/yahoo/ycsb/db/couchbase2/Couchbase2Client.java",
    "chars": 35619,
    "preview": "/**\n * Copyright (c) 2016 Yahoo! Inc. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2.0 (the"
  },
  {
    "path": "couchbase2/src/main/java/com/yahoo/ycsb/db/couchbase2/package-info.java",
    "chars": 799,
    "preview": "/*\n * Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version"
  },
  {
    "path": "distribution/pom.xml",
    "chars": 8793,
    "preview": "<!-- \nCopyright (c) 2012 - 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 "
  },
  {
    "path": "distribution/src/main/assembly/distribution.xml",
    "chars": 3575,
    "preview": "<!-- \nCopyright (c) 2012 - 2015 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 "
  },
  {
    "path": "doc/coreproperties.html",
    "chars": 2507,
    "preview": "<HTML>\r\n<!-- \r\nCopyright (c) 2010 Yahoo! Inc. All rights reserved.\r\n\r\nLicensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "doc/coreworkloads.html",
    "chars": 3952,
    "preview": "<HTML>\r\n<!-- \r\nCopyright (c) 2010 Yahoo! Inc. All rights reserved.\r\n\r\nLicensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "doc/dblayer.html",
    "chars": 6495,
    "preview": "<HTML>\r\n<!-- \r\nCopyright (c) 2010 Yahoo! Inc. All rights reserved.\r\n\r\nLicensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "doc/index.html",
    "chars": 4244,
    "preview": "<html>\r\n<!-- \r\nCopyright (c) 2010 Yahoo! Inc. All rights reserved.\r\n\r\nLicensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "doc/parallelclients.html",
    "chars": 2447,
    "preview": "<HTML>\r\n<!-- \r\nCopyright (c) 2010 Yahoo! Inc. All rights reserved.\r\n\r\nLicensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "doc/tipsfaq.html",
    "chars": 2953,
    "preview": "<HTML>\r\n<!-- \r\nCopyright (c) 2010 Yahoo! Inc. All rights reserved.\r\n\r\nLicensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "doc/workload.html",
    "chars": 9606,
    "preview": "<HTML>\r\n<!-- \r\nCopyright (c) 2010 Yahoo! Inc. All rights reserved.\r\n\r\nLicensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "dynamodb/README.md",
    "chars": 3082,
    "preview": "<!--\nCopyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors.\nAll rights reserved.\n\nLicensed under the Apache Lice"
  },
  {
    "path": "dynamodb/conf/AWSCredentials.properties",
    "chars": 763,
    "preview": "# Copyright (c) 2012 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "dynamodb/conf/dynamodb.properties",
    "chars": 3898,
    "preview": "# Copyright (c) 2012 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "dynamodb/pom.xml",
    "chars": 1709,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n\nLicensed"
  },
  {
    "path": "dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java",
    "chars": 11907,
    "preview": "/*\n * Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * Copyright 2015-2016 YCSB Contributors. "
  },
  {
    "path": "dynamodb/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 776,
    "preview": "/*\n * Copyright 2015-2016 YCSB Contributors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "dynamodb/src/main/resources/log4j.properties",
    "chars": 1069,
    "preview": "# Copyright (c) 2012 YCSB contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "elasticsearch/README.md",
    "chars": 3224,
    "preview": "<!--\nCopyright (c) 2012 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "elasticsearch/pom.xml",
    "chars": 2286,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n\nLicensed"
  },
  {
    "path": "elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticsearchClient.java",
    "chars": 13285,
    "preview": "/**\n * Copyright (c) 2012 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "elasticsearch/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 792,
    "preview": "/*\n * Copyright (c) 2014, Yahoo!, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "elasticsearch/src/test/java/com/yahoo/ycsb/db/ElasticsearchClientTest.java",
    "chars": 4643,
    "preview": "/**\n * Copyright (c) 2012-2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version "
  },
  {
    "path": "elasticsearch5/README.md",
    "chars": 4176,
    "preview": "<!--\nCopyright (c) 2017 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "elasticsearch5/pom.xml",
    "chars": 7258,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2017 YCSB contributors. All rights reserved.\n\nLicensed under "
  },
  {
    "path": "elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/Elasticsearch5.java",
    "chars": 1079,
    "preview": "/*\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2."
  },
  {
    "path": "elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchClient.java",
    "chars": 11330,
    "preview": "/*\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2."
  },
  {
    "path": "elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchRestClient.java",
    "chars": 16078,
    "preview": "/*\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Version 2."
  },
  {
    "path": "elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/package-info.java",
    "chars": 812,
    "preview": "/*\n * Copyright (c) 2017 YCSB Contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "elasticsearch5/src/main/resources/log4j2.properties",
    "chars": 296,
    "preview": "appender.console.type = Console\nappender.console.name = console\nappender.console.layout.type = PatternLayout\nappender.co"
  },
  {
    "path": "elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchClientIT.java",
    "chars": 884,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchIntegTestBase.java",
    "chars": 3438,
    "preview": "package com.yahoo.ycsb.db.elasticsearch5;\n\nimport com.yahoo.ycsb.ByteIterator;\nimport com.yahoo.ycsb.Client;\nimport com."
  },
  {
    "path": "elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchRestClientIT.java",
    "chars": 882,
    "preview": "/**\n * Copyright (c) 2017 YCSB contributors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "geode/README.md",
    "chars": 1977,
    "preview": "<!--\nCopyright (c) 2014 - 2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 ("
  },
  {
    "path": "geode/pom.xml",
    "chars": 1600,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- \nCopyright (c) 2012 - 2016 YCSB contributors. All rights reserved.\n\nLicensed"
  },
  {
    "path": "geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java",
    "chars": 7531,
    "preview": "/**\n * Copyright (c) 2013 - 2016 YCSB Contributors. All rights reserved.\n * <p>\n * Licensed under the Apache License, Ve"
  },
  {
    "path": "geode/src/main/java/com/yahoo/ycsb/db/package-info.java",
    "chars": 789,
    "preview": "/*\n * Copyright (c) 2014-2016, Yahoo!, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (t"
  },
  {
    "path": "googlebigtable/README.md",
    "chars": 4009,
    "preview": "<!--\nCopyright (c) 2016 YCSB contributors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"Li"
  }
]

// ... and 184 more files (download for full content)

About this extraction

This page contains the full source code of the cld378632668/YCSB_leveldb_leveldbjni_rocksdb GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 384 files (1.6 MB), approximately 417.0k tokens, and a symbol index with 1430 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!