diff --git a/cassandra2/src/test/resources/ycsb.cql b/cassandra2/src/test/resources/ycsb.cql index 2888bdce3a..c52ab787b2 100644 --- a/cassandra2/src/test/resources/ycsb.cql +++ b/cassandra2/src/test/resources/ycsb.cql @@ -1,3 +1,20 @@ +/** + * 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. + */ + CREATE TABLE usertable ( y_id varchar primary key, field0 varchar, diff --git a/core/src/main/java/com/yahoo/ycsb/Status.java b/core/src/main/java/com/yahoo/ycsb/Status.java index cda8147711..ac23f57648 100644 --- a/core/src/main/java/com/yahoo/ycsb/Status.java +++ b/core/src/main/java/com/yahoo/ycsb/Status.java @@ -1,3 +1,20 @@ +/** + * 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; /** @@ -6,8 +23,8 @@ public class Status { private final String name; private final String description; - - + + /** * @param name A short name for the status. * @param description A description of the status. @@ -67,6 +84,6 @@ public boolean equals(Object obj) { public static final Status NOT_FOUND = new Status("NOT_FOUND", "The requested record was not found."); public static final Status NOT_IMPLEMENTED = new Status("NOT_IMPLEMENTED", "The operation is not implemented for the current binding."); public static final Status UNEXPECTED_STATE = new Status("UNEXPECTED_STATE", "The operation reported success, but the result was not as expected."); - + } diff --git a/dynamodb/README.md b/dynamodb/README.md index 42f84e7228..61455ed919 100644 --- a/dynamodb/README.md +++ b/dynamodb/README.md @@ -1,22 +1,44 @@ -CONFIGURE + + +# DynamoDB Binding + +http://aws.amazon.com/documentation/dynamodb/ + +## Configure + + YCSB_HOME - YCSB home directory + DYNAMODB_HOME - Amazon DynamoDB package files Please refer to https://github.com/brianfrankcooper/YCSB/wiki/Using-the-Database-Libraries for more information on setup. -BENCHMARK +# Benchmark -$YCSB_HOME/bin/ycsb load dynamodb -P workloads/workloada -P dynamodb.properties -$YCSB_HOME/bin/ycsb run dynamodb -P workloads/workloada -P dynamodb.properties + $YCSB_HOME/bin/ycsb load dynamodb -P workloads/workloada -P dynamodb.properties + $YCSB_HOME/bin/ycsb run dynamodb -P workloads/workloada -P dynamodb.properties -PROPERTIES +# Properties -$DYNAMODB_HOME/conf/dynamodb.properties -$DYNAMODB_HOME/conf/AWSCredentials.properties + $DYNAMODB_HOME/conf/dynamodb.properties + $DYNAMODB_HOME/conf/AWSCredentials.properties -FAQs +# FAQs * Why is the recommended workload distribution set to 'uniform'? This is to conform with the best practices for using DynamoDB - uniform, evenly distributed workload is the recommended pattern for scaling and @@ -27,12 +49,12 @@ http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/BestPract * How does workload size affect provisioned throughput? The default payload size requires double the provisioned throughput to execute -the workload. This translates to double the provisioned throughput cost for testing. -The default item size in YCSB are 1000 bytes plus metadata overhead, which makes the -item exceed 1024 bytes. DynamoDB charges one capacity unit per 1024 bytes for read -or writes. An item that is greater than 1024 bytes but less than or equal to 2048 bytes -would cost 2 capacity units. With the change in payload size, each request would cost -1 capacity unit as opposed to 2, saving the cost of running the benchmark. +the workload. This translates to double the provisioned throughput cost for testing. +The default item size in YCSB are 1000 bytes plus metadata overhead, which makes the +item exceed 1024 bytes. DynamoDB charges one capacity unit per 1024 bytes for read +or writes. An item that is greater than 1024 bytes but less than or equal to 2048 bytes +would cost 2 capacity units. With the change in payload size, each request would cost +1 capacity unit as opposed to 2, saving the cost of running the benchmark. For more information refer to http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/WorkingWithDDTables.html @@ -43,7 +65,7 @@ than zero, either increase the DynamoDB table provisioned throughput or reduce YCSB throughput by reducing YCSB target throughput, adjusting the number of YCSB client threads, or combination of both. -For more information please refer to +For more information please refer to https://github.com/brianfrankcooper/YCSB/blob/master/doc/tipsfaq.html When requests are throttled, latency measurements by YCSB can increase. diff --git a/hypertable/README.md b/hypertable/README.md index 671ffc0b37..1a8da55178 100644 --- a/hypertable/README.md +++ b/hypertable/README.md @@ -1,39 +1,54 @@ -1 Install Hypertable + +# Install Hypertable -2 Set Up YCSB +Installation instructions for Hypertable can be found at: -Clone the YCSB git repository and compile: + code.google.com/p/hypertable/wiki/HypertableManual -]$ git clone git://github.com/brianfrankcooper/YCSB.git -]$ cd YCSB -]$ mvn clean package +# Set Up YCSB + +Clone the YCSB git repository and compile: + ]$ git clone git://github.com/brianfrankcooper/YCSB.git + ]$ cd YCSB + ]$ mvn clean package -3 Run Hypertable +# Run Hypertable Once it has been installed, start Hypertable by running -]$ ./bin/ht start all-servers hadoop + ]$ ./bin/ht start all-servers hadoop if an instance of HDFS is running or -]$ ./bin/ht start all-servers local + ]$ ./bin/ht start all-servers local if the database is backed by the local file system. YCSB accesses a table called 'usertable' by default. Create this table through the Hypertable shell by running -]$ ./bin/ht shell -hypertable> use '/ycsb'; -hypertable> create table usertable(family); -hypertable> quit + ]$ ./bin/ht shell + hypertable> use '/ycsb'; + hypertable> create table usertable(family); + hypertable> quit All iteractions by YCSB take place under the Hypertable namespace '/ycsb'. Hypertable also uses an additional data grouping structure called a column @@ -44,31 +59,27 @@ The name of this column family must be passed to YCSB. The table can be manipulated from within the hypertable shell without interfering with the operation of YCSB. - - -4 Run YCSB +# Run YCSB Make sure that an instance of Hypertable is running. To access the database through the YCSB shell, from the YCSB directory run: -]$ ./bin/ycsb shell hypertable -p columnfamily=family + ]$ ./bin/ycsb shell hypertable -p columnfamily=family where the value passed to columnfamily matches that used in the table creation. To run a workload, first load the data: -]$ ./bin/ycsb load hypertable -P workloads/workloada -p columnfamily=family + ]$ ./bin/ycsb load hypertable -P workloads/workloada -p columnfamily=family Then run the workload: -]$ ./bin/ycsb run hypertable -P workloads/workloada -p columnfamily=family + ]$ ./bin/ycsb run hypertable -P workloads/workloada -p columnfamily=family This example runs the core workload 'workloada' that comes packaged with YCSB. The state of the YCSB data in the Hypertable database can be reset by dropping usertable and recreating it. - - -+ Configuration Parameters +# Configuration Parameters Hypertable configuration settings can be found in conf/hypertable.cfg under your main hypertable directory. Make sure that the constant THRIFTBROKER_PORT diff --git a/jdbc/src/main/resources/sql/README b/jdbc/src/main/resources/sql/README deleted file mode 100644 index 3afd704722..0000000000 --- a/jdbc/src/main/resources/sql/README +++ /dev/null @@ -1 +0,0 @@ -Contains all the SQL statements used by the JDBC client. diff --git a/jdbc/src/main/resources/sql/README.md b/jdbc/src/main/resources/sql/README.md new file mode 100644 index 0000000000..ec41b86c04 --- /dev/null +++ b/jdbc/src/main/resources/sql/README.md @@ -0,0 +1,18 @@ + +Contains all the SQL statements used by the JDBC client.