LoginSignup
2
2

More than 5 years have passed since last update.

YCSB のビルドで HBase の依存関係のエラーが発生した場合

Posted at

HBase のベンチマークを行うために YCSB 0.1.4 を Maven を使いビルドしようとしたが、以下のエラーで詰まった。

[ERROR] Failed to execute goal on project hbase-binding: Could not resolve dependencies for project com.yahoo.ycsb:hbase-binding:jar:0.1.4: Could not find artifact org.apache.hbase:hbase:jar:0.98.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

環境

  • CentOS 6.5 64bit
  • Java 1.7.0
  • HBase 0.98.0

取得するモジュールの設定を変更する

hbase-0.96 から hbase モジュールは複数のモジュールに分割されたため、必要なモジュール名を個別に指定する必要があるようです。

YCSB をクローンした後 pom.xml ファイルを修正し、依存するライブラリの情報を新しいバージョンに合わせて書き直します。

YCSB/pom.xml を書き換える

pam.xml
  <!-- Properties Management -->
  <properties>
    ...
    <hbase.version>0.98.0-hadoop2</hbase.version>
    ...
  </properties>

YCSB/hbasse/pom.xml を書き換える

デフォルトの hbase モジュールに関する記述をコメントアウトし、新たに hbase-client, hbase-common を追加する。

pom.xml
  <dependencies>
    <!--
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase</artifactId>
      <version>${hbase.version}</version>
    </dependency>
    -->

    <!-- 以下を追加 -->
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-client</artifactId>
      <version>${hbase.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-common</artifactId>
      <version>${hbase.version}</version>
    </dependency>

    ...

  </dependencies>

後は Getting Started の手順通りビルド & 実行すれば OK でした。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2