Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cvitter/ycsb-riak-binding
https://github.com/cvitter/ycsb-riak-binding
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/cvitter/ycsb-riak-binding
- Owner: cvitter
- Created: 2014-11-22T20:01:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-10-04T23:41:52.000Z (about 2 years ago)
- Last Synced: 2023-04-03T22:23:47.807Z (over 1 year ago)
- Language: Java
- Size: 8.79 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Note: See https://github.com/basho-labs/YCSB/tree/master/riak for the most recent version of this code.
Riak Client for Yahoo! Cloud System Benchmark (YCSB)
--------------------------------------------------------The Riak YCSB client is designed to work with the Yahoo! Cloud System Benchmark (YCSB) project (https://github.com/brianfrankcooper/YCSB) to support performance testing for the 2.0.X line of the Riak database.
Note: In order to support YCSB's scan operation you must enable Riak Search on every node within your cluster. For instructions on enabling Search see: http://docs.basho.com/riak/latest/ops/advanced/configs/search/
How to Implement the Riak Client
----------------------------
The following directions will help you get started with benchmarking Riak using the YCCB project and Riak client.* Download the YCSB project from https://github.com/brianfrankcooper/YCSB and extract the contents onto the machine, or machines, you plan to execute the project from. Note: YCSB requires Java and Maven.
* Download the YCSB-Riak-Binding project and copy the Riak folder into the YCSB folder.
* Modify the following sections of the YCSB's POM file to add the Riak client:
```
...
2.0.2
...```
```
...
riak
...```
* Modify the ycsb file in the YCSB bin folder to add the Riak client in the DATABASES section as shown below::
```
DATABASES = {
"basic" : "com.yahoo.ycsb.BasicDB",
...
"riak" : "com.yahoo.ycsb.db.RiakDBClient"
}
```* Perform the following operations on your Riak cluster to configure Riak for the benchmarks:
Upload the Solr search schema used to support YCSB's scan operation to one of the nodes in your cluster. (Note: update the URL and file path to match your environment.)```
curl -XPUT "http://localhost:8098/search/schema/ycsb" \
-H'content-type:application/xml' \
--data-binary @/Users/user/git/YCSB-Riak-Binding/riak/yz_schema/yscb-schema.xml
```Create the "ycsb" search index that uses the schema that we just uploaded to Riak.```
curl -i -XPUT http://localhost:8098/search/index/ycsb \
-H 'content-type: application/json' \
-d '{"schema":"ycsb"}'
```
Create the "ycsb" bucket type and assign the ycsb search index to the bucket type by logging into one of the nodes in your cluster and run the following riak-admin commands:```
riak-admin bucket-type create ycsb '{"props":{"search_index":"ycsb","allow_mult":"false"}}'
riak-admin bucket-type activate ycsb
```* Modify NODES_ARRAY in RiakDBClient.java to include all of the nodes in your Riak test cluster.
```
// Array of nodes in the Riak cluster or load balancer in front of the cluster
private static final String[] NODES_ARRAY = {"127.0.0.1"};
```* Build the YCSB project by running the following command in the YCSB root
```
mvn clean package
```* Load and run a YCSB workload using the Riak client:
```
./bin/ycsb load riak -P workloads/workloada
./bin/ycsb run riak -P workloads/workloada
```Note: For more information on workloads and how to run them please see: https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload