YCSB向けGridDBコネクタを使ってみよう

YCSB向けのGridDBコネクタは、 Yahoo Cloud Serving Benchmark を使用してGridDBデータベースのベンチマークを可能にします。このガイドは JDK 1.7.0_79 および YCSB 0.10.0 の CentOS 6.7 (x64) 用に作成されています。

YCSBGridDBコネクタのビルド

  1. YCSBをインストールします。
    ~ $ wget https://github.com/brianfrankcooper/YCSB/releases/download/0.10.0/ycsb-0.10.0.tar.gz
    ~ $ tar xfvz ycsb-0.10.0.tar.gz
    ~ $ cd ycsb-0.10.0

    YCSBをビルドする方法は、 https://github.com/brianfrankcooper/YCSB/wiki/Getting-Started を参照してください。

  2. GridDBコネクタをYCSB最上位ディレクトリにダウンロードします。
    ycsb-0.10.0 $ git clone https://github.com/griddb/griddb_ycsb.git
    ycsb-0.10.0 $ mv -a griddb_ycsb/griddb  griddb_ycsb/build.xml .
  3. bin/ycsbを以下のように編集します。
    DATABASES = {
     "griddb" : "com.yahoo.ycsb.db.GridDBClient",
     ...
  4. GridDBプラグインを構築します。
     ycsb-0.10.0 $ mkdir -p griddb-binding/lib
     ycsb-0.10.0 $ ant griddb

    これで griddb-binding/lib/griddb-binding.jar が作成されます。

GridDBの設定に関する注意点

最適なパフォーマンスを得るには、gs_node.json 内の /dataStore/concurrency に CPU コアの数を、gs_cluster.json 内の /dataStore/storeBlockSize に “32KB” を設定します。

YCSBの実行

GridDBサーバを起動後、YCSBを実行することができます。

まず、データセットをロードします。

ycsb-0.10.0 $ ./bin/ycsb load griddb -P workloads/workloada 
    -p notificationAddress=<GridDB notification address(default is 239.0.0.1)> 
    -p notificationPort=<GridDB notification port(default is 31999)> 
    -p clusterName=<GridDB cluster name> 
    -p userName=<GridDB user name> 
    -p password=<GridDB password> 
    -p fieldcount=10 
    -p fieldlength=100

するとトランザクション・ワークロードの実行が可能になります。

ycsb-0.10.0 $ ./bin/ycsb run griddb -P workloads/workloada
    -p notificationAddress=<GridDB notification address(default is 239.0.0.1)> 
    -p notificationPort=<GridDB notification port(default is 31999)> 
    -p clusterName=<GridDB cluster name> 
    -p userName=<GridDB user name> 
    -p password=<GridDB password> 
    -p fieldcount=10 
    -p fieldlength=100

クラスタ接続方式として固定リスト方式 (FIXED_LIST) を使用している場合は、notificationAddress 変数と notificationPort 変数を notificationMember 変数に置き換えます。この値は、ノードIPとポートのカンマ区切りリスト (“10.0.0.1:10001,10.0.0.2:10001,10.0.0.3:10001” など) にする必要があります。

コミュニティ

問題が発生した場合やリクエストやその他のご質問がある場合は、ディスカッションフォーラム にフィードバックしてください。

If you have any questions about the blog, please create a Stack Overflow post here https://stackoverflow.com/questions/ask?tags=griddb .
Make sure that you use the “griddb” tag so our engineers can quickly reply to your questions.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください