You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Vaibhav Puranik <vp...@gmail.com> on 2009/07/27 19:47:01 UTC

Updated Version of Spring classes for HBase

*I have modified the spring class HBaseConfigurationFactoryBean in a way
that will allow developers to set any property of the HBaseConfiguration for
the client.*

The updated configuration will look like:

<bean id="hbaseConfiguration"
class="com.gumgum.hbase.HBaseConfigurationFactoryBean">
        <property name="hbaseProperties">
        <props>
           <!-- hbase.zookeeper.quorum is required. Other properties are
optional-->
            <prop
key="hbase.zookeeper.quorum">${hbase.zookeeper.quorum}</prop>
        </props>
        </property>
    </bean>

I have updated the original spring issue with the new class. Here is the url
of the issue:
http://jira.springframework.org/browse/SPR-5950

I am also attaching the three classes with this email: HbaseCallback.java,
HBaseConfigurationFactoryBean.java and HBaseTemplate.java

Here is the remaining configuration you will need to do:
<bean id="hbaseTemplate" class="com.gumgum.hbase.HBaseTemplate">
        <constructor-arg ref="hTablePool"/>
</bean>

<bean id="hTablePool" class="org.apache.hadoop.hbase.client.HTablePool">
        <constructor-arg ref="hbaseConfiguration"/>
        <constructor-arg value="${hbase.htable.pool.size}"/>
</bean>


Regards,
Vaibhav Puranik
Gumgum