Skip to content
Snippets Groups Projects
Commit 92c69c55 authored by Connor McCoy's avatar Connor McCoy
Browse files

Merge branch 'missing-licence'

parents a3586e47 a0527af5
No related branches found
No related tags found
No related merge requests found
/**
* 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,
......
/**
* 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 @@ package com.yahoo.ycsb;
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 class Status {
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.");
}
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
......@@ -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.
......
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
......@@ -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
......
Contains all the SQL statements used by the JDBC client.
<!--
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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment