Spring Data と HBase に興味があります。このjarをpomに含めました:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-hadoop</artifactId>
<version>1.0.1.RELEASE</version>
</dependency>
HbaseTemplateクラスの使用に関するリファレンスがいくつかあります。
これらの例にはすべて、XML ベースの Spring HBase 構成があります。私は注釈ベース構成を使用しています。
// default HBase configuration
<hdp:hbase-configuration/>
// wire hbase configuration (using default name 'hbaseConfiguration') into the template
<bean id="htemplate" class="org.springframework.data.hadoop.hbase.HbaseTemplate" p:configuration-ref="hbaseConfiguration"/>
次のような注釈からこれを行うにはどうすればよいですか。
@Bean
@Named("hbaseTemplate")
public HbaseTemplate hbaseTemplate() {
return new HbaseTemplate();
}
私はそのアプローチを試みましたが、失敗しました。