Skip to content

Commit

Permalink
[license] Apply results of Apache Rat check
Browse files Browse the repository at this point in the history
Also fix a few README formatting issues.

        mvn org.apache.rat:apache-rat-plugin:0.11:check -D rat.numUnapprovedLicenses=5000
  • Loading branch information
cmccoy committed Nov 4, 2015
1 parent b116ee5 commit a0527af
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 45 deletions.
17 changes: 17 additions & 0 deletions cassandra2/src/test/resources/ycsb.cql
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
23 changes: 20 additions & 3 deletions core/src/main/java/com/yahoo/ycsb/Status.java
Original file line number Diff line number Diff line change
@@ -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;

/**
Expand All @@ -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.
Expand Down Expand Up @@ -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.");

}

56 changes: 39 additions & 17 deletions dynamodb/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
CONFIGURE
<!--
Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors.
All rights reserved.
YCSB_HOME - YCSB home directory
DYNAMODB_HOME - Amazon DynamoDB package files
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.
-->

# 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
Expand All @@ -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
Expand All @@ -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.
Expand Down
59 changes: 35 additions & 24 deletions hypertable/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,54 @@
1 Install Hypertable
<!--
Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors.
All rights reserved.
Installation instructions for Hypertable can be found at:
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
code.google.com/p/hypertable/wiki/HypertableManual
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.
-->

# 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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion jdbc/src/main/resources/sql/README

This file was deleted.

18 changes: 18 additions & 0 deletions jdbc/src/main/resources/sql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
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.
-->
Contains all the SQL statements used by the JDBC client.

0 comments on commit a0527af

Please sign in to comment.