YCSB準備
pom.xml
CDH3を使っている場合はpom.xmlのhbase versionを0.90.5とすること。
HBase向けの使い方
YCSB用のテーブルとcolumnfamilyの作成
hbase shellで以下の作業を実施。
hbase(main)> create 'usertable', 'family'
HBase設定ファイル編集
以下のファイルでHBaseクライアントの設定を行う。
- YCSB/hbase/src/main/conf/hbase-site.xml
変更が必須な項目は以下の通り。
- Zookeeperアンサンブル:hbase.zookeeper.quorum
YCSB実行
%SOMEWHERE%/YCSBで以下のコマンドを実行
$ ./bin/ycsb run hbase -P workloads/workloadb -p columnfamily=family
YCSBコマンドオプション
Usage: ./bin/ycsb command database [options]
Commands:
load Execute the load phase
run Execute the transaction phase
shell Interactive mode
Databases:
hbase https://github.com/brianfrankcooper/YCSB/tree/master/hbase
Options:
-P file Specify workload file
-p key=value Override workload property
-s Print status to stderr
-target n Target ops/sec (default: unthrottled)
-threads n Number of client threads (default: 1)
Workload Files:
There are various predefined workloads under workloads/ directory.
See https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties
for the list of workload properties.
link
最終更新:2012年08月16日 15:21