diff --git a/hbase/README.md b/hbase/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6dc17b60889891f74cd311090c199b0b036ae855 --- /dev/null +++ b/hbase/README.md @@ -0,0 +1,52 @@ +# HBase Driver for YCSB +This driver is a binding for the YCSB facilities to operate against a HBase Server cluster. + +## Quickstart + +### 1. Start a HBase Server +You need to start a single node or a cluster to point the client at. Please see [Apache HBase Reference Guide](http://hbase.apache.org/book.html) for more details and instructions. + +### 2. Set up YCSB +You need to clone the repository and compile everything. + +``` +git clone git://github.com/brianfrankcooper/YCSB.git +cd YCSB +mvn clean package +``` + +### 3. Create a HBase table for testing + +``` +/HBASE-HOME-DIR/bin/hbase shell + +hbase(main):001:0> create 'usertable', 'family' +``` + +### 4. Run the Workload +Before you can actually run the workload, you need to "load" the data first. + +You should specify a HBase config directory(or any other directory containing your hbase-site.xml) and a table name and a column family(-cp is used to set java classpath and -p is used to set various properties). + +``` +bin/ycsb load hbase -P workloads/workloada -cp /HBASE-HOME-DIR/conf -p table=usertable -p columnfamily=family +``` + +Then, you can run the workload: + +``` +bin/ycsb run hbase -P workloads/workloada -cp /HBASE-HOME-DIR/conf -p table=usertable -p columnfamily=family +``` + +Please see the general instructions in the `doc` folder if you are not sure how it all works. You can apply additional properties (as seen in the next section) like this: + +``` +bin/ycsb run hbase -P workloads/workloada -cp /HBASE-HOME-DIR/conf -p table=usertable -p columnfamily=family -p clientbuffering=true +``` + +## Configuration Options +Following options can be configurable using -p. + +* clientbuffering : If true, buffer mutations on the client. The default is false. +* writebuffersize : Buffer size to be used when clientbuffering is activated. The default is 12582912(= 1024 * 1024 * 12). +* debug : If true, debugging logs are activated. The default is false. diff --git a/hbase/src/main/conf/hbase-site.xml b/hbase/src/main/conf/hbase-site.xml deleted file mode 100644 index 9c95a473d6f84843898f5787041ec2e761df5178..0000000000000000000000000000000000000000 --- a/hbase/src/main/conf/hbase-site.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- -/** - * Copyright 2009 The Apache Software Foundation - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ ---> -<configuration> - <property> - <name>hbase.rootdir</name> - <value>hdfs://<HBASE_MASTER_SERVER>:20001/hbase</value> - <description>The directory shared by region servers. - </description> - </property> - <property> - <name>hbase.master</name> - <value><HBASE_MASTER_SERVER>:60000</value> - <description>The host and port that the HBase master runs at. - </description> - </property> - <property> - <name>hbase.zookeeper.quorum</name> - <value><HBASE_MASTER_SERVER></value> - </property> -</configuration>