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/22 19:29:57 UTC
Spring classes for HBase
Hi Everybody,
We have created Spring like classes - *HBaseTemplate, HBaseCallback and
HBaseConfigurationFactoryBean* for all the *Spring Framework* fans.
This will make it easy to use HBase with Spring Framework. *You can download
the classes from following Spring Framework issue:*
http://jira.springframework.org/browse/SPR-5950
Here is how you would configure your spring beans:
<bean id="hbaseTemplate" class="com.gumgum.hbase.HBaseTemplate">
<constructor-arg ref="hTablePool"/>
</bean>
<bean id="hbaseConfiguration"
class="com.gumgum.hbase.HBaseConfigurationFactoryBean">
<property name="hbaseMaster" value="${hbase.master}"/>
</bean>
<bean id="hTablePool" class="org.apache.hadoop.hbase.client.HTablePool">
<constructor-arg ref="hbaseConfiguration"/>
<constructor-arg value="${hbase.htable.pool.size}"/>
</bean>
Please note that hbase.master and hbase.htable.pool.size are the
configurable variables.
These classes are built on the top of the new HTablePool written by Ken
Weiner and Jonathan Gray.
Regards,
Vaibhav Puranik,
Gumgum
Re: Spring classes for HBase
Posted by stack <st...@duboce.net>.
Ken is right. My bad.
All it needs know is where to find hbase -- the quorum settings.
You might want to add later some of the client-side configs like how many
items to cache scanning, and write buffer sizes.
St.Ack
On Thu, Jul 23, 2009 at 10:07 AM, Ken Weiner <ke...@gumgum.com> wrote:
> St.Ack,
>
> I am curious why a client would need to specify the hbase.rootdir which is
> already configured on the hbase server. My hbase.rootdir is set to a
> location in HDFS. The client doesn't need to know anything about that,
> does
> it?
>
> -Ken
>
> On Wed, Jul 22, 2009 at 10:44 PM, stack <st...@duboce.net> wrote:
>
> > On Wed, Jul 22, 2009 at 4:15 PM, Vaibhav Puranik <vp...@gmail.com>
> > wrote:
> >
> > > I will add it as soon as I fix upload the updated classes.
> > >
> > > I had to update the spring classes to remove hbase.master and replace
> it
> > by
> > > hbase.zookeeper.quorum.
> > >
> > > It will be great if you can tell me which properties do we need to
> > > configure
> > > in client. I can accordingly change code and spring configuration.
> > >
> >
> >
> > Start simple I'd say. hbase.rootdir and hbase.zookeeper.quorum.
> > St.Ack
> >
>
Re: Spring classes for HBase
Posted by Ken Weiner <ke...@gumgum.com>.
St.Ack,
I am curious why a client would need to specify the hbase.rootdir which is
already configured on the hbase server. My hbase.rootdir is set to a
location in HDFS. The client doesn't need to know anything about that, does
it?
-Ken
On Wed, Jul 22, 2009 at 10:44 PM, stack <st...@duboce.net> wrote:
> On Wed, Jul 22, 2009 at 4:15 PM, Vaibhav Puranik <vp...@gmail.com>
> wrote:
>
> > I will add it as soon as I fix upload the updated classes.
> >
> > I had to update the spring classes to remove hbase.master and replace it
> by
> > hbase.zookeeper.quorum.
> >
> > It will be great if you can tell me which properties do we need to
> > configure
> > in client. I can accordingly change code and spring configuration.
> >
>
>
> Start simple I'd say. hbase.rootdir and hbase.zookeeper.quorum.
> St.Ack
>
Re: Spring classes for HBase
Posted by stack <st...@duboce.net>.
On Wed, Jul 22, 2009 at 4:15 PM, Vaibhav Puranik <vp...@gmail.com> wrote:
> I will add it as soon as I fix upload the updated classes.
>
> I had to update the spring classes to remove hbase.master and replace it by
> hbase.zookeeper.quorum.
>
> It will be great if you can tell me which properties do we need to
> configure
> in client. I can accordingly change code and spring configuration.
>
Start simple I'd say. hbase.rootdir and hbase.zookeeper.quorum.
St.Ack
Re: Spring classes for HBase
Posted by Vaibhav Puranik <vp...@gmail.com>.
I will add it as soon as I fix upload the updated classes.
I had to update the spring classes to remove hbase.master and replace it by
hbase.zookeeper.quorum.
It will be great if you can tell me which properties do we need to configure
in client. I can accordingly change code and spring configuration.
Regards,
Vaibhav Puranik,
Gumgum
On Wed, Jul 22, 2009 at 3:43 PM, stack <st...@duboce.net> wrote:
> Excellent. Please add a link here:
> http://wiki.apache.org/hadoop/SupportingProjects.
> St.Ack
>
> On Wed, Jul 22, 2009 at 10:29 AM, Vaibhav Puranik <vpuranik@gmail.com
> >wrote:
>
> > Hi Everybody,
> >
> > We have created Spring like classes - *HBaseTemplate, HBaseCallback and
> > HBaseConfigurationFactoryBean* for all the *Spring Framework* fans.
> >
> > This will make it easy to use HBase with Spring Framework. *You can
> > download
> > the classes from following Spring Framework issue:*
> > http://jira.springframework.org/browse/SPR-5950
> >
> > Here is how you would configure your spring beans:
> >
> > <bean id="hbaseTemplate" class="com.gumgum.hbase.HBaseTemplate">
> > <constructor-arg ref="hTablePool"/>
> > </bean>
> >
> > <bean id="hbaseConfiguration"
> > class="com.gumgum.hbase.HBaseConfigurationFactoryBean">
> > <property name="hbaseMaster" value="${hbase.master}"/>
> > </bean>
> >
> > <bean id="hTablePool"
> class="org.apache.hadoop.hbase.client.HTablePool">
> > <constructor-arg ref="hbaseConfiguration"/>
> > <constructor-arg value="${hbase.htable.pool.size}"/>
> > </bean>
> >
> >
> > Please note that hbase.master and hbase.htable.pool.size are the
> > configurable variables.
> >
> > These classes are built on the top of the new HTablePool written by Ken
> > Weiner and Jonathan Gray.
> >
> > Regards,
> > Vaibhav Puranik,
> > Gumgum
> >
>
Re: Spring classes for HBase
Posted by stack <st...@duboce.net>.
Excellent. Please add a link here:
http://wiki.apache.org/hadoop/SupportingProjects.
St.Ack
On Wed, Jul 22, 2009 at 10:29 AM, Vaibhav Puranik <vp...@gmail.com>wrote:
> Hi Everybody,
>
> We have created Spring like classes - *HBaseTemplate, HBaseCallback and
> HBaseConfigurationFactoryBean* for all the *Spring Framework* fans.
>
> This will make it easy to use HBase with Spring Framework. *You can
> download
> the classes from following Spring Framework issue:*
> http://jira.springframework.org/browse/SPR-5950
>
> Here is how you would configure your spring beans:
>
> <bean id="hbaseTemplate" class="com.gumgum.hbase.HBaseTemplate">
> <constructor-arg ref="hTablePool"/>
> </bean>
>
> <bean id="hbaseConfiguration"
> class="com.gumgum.hbase.HBaseConfigurationFactoryBean">
> <property name="hbaseMaster" value="${hbase.master}"/>
> </bean>
>
> <bean id="hTablePool" class="org.apache.hadoop.hbase.client.HTablePool">
> <constructor-arg ref="hbaseConfiguration"/>
> <constructor-arg value="${hbase.htable.pool.size}"/>
> </bean>
>
>
> Please note that hbase.master and hbase.htable.pool.size are the
> configurable variables.
>
> These classes are built on the top of the new HTablePool written by Ken
> Weiner and Jonathan Gray.
>
> Regards,
> Vaibhav Puranik,
> Gumgum
>