You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by chandra <ch...@cognizant.com> on 2008/10/22 08:23:23 UTC

rest web service with hbase

hi..

i'm new to hbase.. i'm try to do restful web service that uses hbase.

can anyone detail on how to connect restful web service to hbase.
and
i unable to find links that contain some examples of them.. kindly post
some links on that..

-- 
Thank you
S.Chandravadana


This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

RE: rest web service with hbase

Posted by Stuti Awasthi <st...@hcl.com>.
Ok. That's good . I have previously used Apache Wink with Java for REST webservice. But this time I have requirement that my app is built on Ruby and I am migrating my database from RDMS to HBase.
I can work from thrift for Ruby interaction with Hbase but wondering that since there is support for REST also how can I make it work with RUBY. 

I can't find much information for this and the Ruby gems which I got is not working properly with Hbase for REST interaction.


-----Original Message-----
From: Zhong, Andy [mailto:Sheng.Zhong@searshc.com] 
Sent: Friday, August 26, 2011 10:25 AM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

Java on Jboss  

-----Original Message-----
From: Stuti Awasthi [mailto:stutiawasthi@hcl.com]
Sent: Thursday, August 25, 2011 11:50 PM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

Hi Zhong,

Are you using Ruby for the development or Java ?

-----Original Message-----
From: Zhong, Andy [mailto:Sheng.Zhong@searshc.com]
Sent: Friday, August 26, 2011 10:04 AM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

The Resteasy web services has been used by us to handle realtime multi-threaded write/reading from Hbase, and the performance is quite decent. 

-----Original Message-----
From: Stuti Awasthi [mailto:stutiawasthi@hcl.com]
Sent: Thursday, August 25, 2011 11:20 PM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

Hi Vincent,
 We also started looking at Massive record and thrift interface. It is working quite smoothly till now but I was just wondering that we have to pass through many interface layers to access Hbase ( like ruby client -> rails -> massive record -> thrift -> Hbase and vice versa )

For the small application performance is fine but what about the performance with big data applications. Are these not slowing the client
- server interaction to some extent.

Please put your thoughts on this.

Thanks


-----Original Message-----
From: vincent.peres@gmail.com [mailto:vincent.peres@gmail.com]
Sent: Thursday, August 25, 2011 4:25 PM
To: user@hbase.apache.org
Subject: Re: rest web service with hbase

Hi,

I don't really know about the REST client but here at Companybook we are using MassiveRecord, which provides a basic thrift wrapper and an ORM if you want to go further.
It's really advanced and work with the latest HBase (I see that HBase client hasn't been updated since 2 years now... HBase got massive updates since that time).

Hope that help!


On Thu, Aug 25, 2011 at 11:59 AM, stuti <st...@hcl.com> wrote:

>
> Hi friends,
>
> I am stuck with my development as I want my ruby client should 
> interact with REST interface to connect to Hbase. To attain this I 
> installed sishen-hbase-ruby gem and hbase-ruby gem on my Ubuntu box.
> I tried to query a  table present in Hbase using the following code 
> but it is giving error.
>
> Code snippet :
>
> require 'rubygems'
> require 'hbase'
>
> client = HBase::Client.new("http://localhost:8080/")            # this
url
> is
> the default.
> table = client.show_table('userstable')                       # show
the
> meta
> info of table users
>
> Error on Console :
>
> /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:9:in `rescue in
show_table':
> Table
> 'userstable' Not found (HBase::TableNotFoundError)
>        from /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:5:in `show_table'
>        from /home/hadoop/Hbase_Script/Test.rb:10:in `<main>'
>
> Error in Hbase Rest server logs :
>
> 2011-08-25 15:10:56,701 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,728 DEBUG
> org.apache.hadoop.hbase.rest.RowResource: GET 
> http://localhost:8080/api/userstable
> 2011-08-25 15:10:56,762 INFO org.apache.zookeeper.ZooKeeper:
> Initiating client connection, connectString=localhost:2181
> sessionTimeout=180000 watcher=hconnection
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Opening 
> socket connection to server localhost/10.33.100.107:2181
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Socket 
> connection established to localhost/10.33.100.107:2181, initiating 
> session
> 2011-08-25 15:10:56,778 INFO org.apache.zookeeper.ClientCnxn: Session 
> establishment complete on server localhost/10.33.100.107:2181, 
> sessionid = 0x131fc710262001f, negotiated timeout = 40000
> 2011-08-25 15:10:56,790 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Lookedup root region location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnecti
> onImplemen
> tation@1acee78; hsa=localhost:36169
> 2011-08-25 15:10:56,791 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,803 WARN
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Encountered problems when prefetch META table:
> org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in
.META.
> for
> table: api, row=api,,99999999999999
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136
)
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.pref
> etchRegionCache(HConnectionManager.java:648)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:702)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
> org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
> ........................
> 2011-08-25 15:10:56,807 ERROR org.mortbay.log: /api/userstable
> java.lang.RuntimeException:
org.apache.hadoop.hbase.TableNotFoundException:
> api
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:38)
>            at
>
org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:1
33)
>            at
> org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:89)
>            at org.apache.hadoop.hbase.rest.RowResultGenerator.<init>
> (RowResultGenerator.java:49)
>            at
>
> org.apache.hadoop.hbase.rest.ResultGenerator.fromRowSpec(ResultGenerat
> or.java:35
> )
>            at
> org.apache.hadoop.hbase.rest.RowResource.get(RowResource.java:85)
>            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) ................
> Caused by: org.apache.hadoop.hbase.TableNotFoundException: api
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:724)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:36)
>            ... 43 more
>
>
> I am able to hit http://localhost:8080 from the browser and it gives 
> me all the tables present.I have no clue why it is adding 
> /api/userstable in the url .
>
> Please tell me how can I resolve it or if there is some other forum to

> which I can point this issue.
>
> Thanks
>
>
>
>

::DISCLAIMER::
------------------------------------------------------------------------
-----------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect.

------------------------------------------------------------------------
-----------------------------------------------

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

RE: rest web service with hbase

Posted by "Zhong, Andy" <Sh...@searshc.com>.
Java on Jboss  

-----Original Message-----
From: Stuti Awasthi [mailto:stutiawasthi@hcl.com] 
Sent: Thursday, August 25, 2011 11:50 PM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

Hi Zhong,

Are you using Ruby for the development or Java ?

-----Original Message-----
From: Zhong, Andy [mailto:Sheng.Zhong@searshc.com]
Sent: Friday, August 26, 2011 10:04 AM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

The Resteasy web services has been used by us to handle realtime
multi-threaded write/reading from Hbase, and the performance is quite
decent. 

-----Original Message-----
From: Stuti Awasthi [mailto:stutiawasthi@hcl.com]
Sent: Thursday, August 25, 2011 11:20 PM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

Hi Vincent,
 We also started looking at Massive record and thrift interface. It is
working quite smoothly till now but I was just wondering that we have to
pass through many interface layers to access Hbase ( like ruby client ->
rails -> massive record -> thrift -> Hbase and vice versa )

For the small application performance is fine but what about the
performance with big data applications. Are these not slowing the client
- server interaction to some extent.

Please put your thoughts on this.

Thanks


-----Original Message-----
From: vincent.peres@gmail.com [mailto:vincent.peres@gmail.com]
Sent: Thursday, August 25, 2011 4:25 PM
To: user@hbase.apache.org
Subject: Re: rest web service with hbase

Hi,

I don't really know about the REST client but here at Companybook we are
using MassiveRecord, which provides a basic thrift wrapper and an ORM if
you want to go further.
It's really advanced and work with the latest HBase (I see that HBase
client hasn't been updated since 2 years now... HBase got massive
updates since that time).

Hope that help!


On Thu, Aug 25, 2011 at 11:59 AM, stuti <st...@hcl.com> wrote:

>
> Hi friends,
>
> I am stuck with my development as I want my ruby client should 
> interact with REST interface to connect to Hbase. To attain this I 
> installed sishen-hbase-ruby gem and hbase-ruby gem on my Ubuntu box.
> I tried to query a  table present in Hbase using the following code 
> but it is giving error.
>
> Code snippet :
>
> require 'rubygems'
> require 'hbase'
>
> client = HBase::Client.new("http://localhost:8080/")            # this
url
> is
> the default.
> table = client.show_table('userstable')                       # show
the
> meta
> info of table users
>
> Error on Console :
>
> /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:9:in `rescue in
show_table':
> Table
> 'userstable' Not found (HBase::TableNotFoundError)
>        from /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:5:in `show_table'
>        from /home/hadoop/Hbase_Script/Test.rb:10:in `<main>'
>
> Error in Hbase Rest server logs :
>
> 2011-08-25 15:10:56,701 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,728 DEBUG
> org.apache.hadoop.hbase.rest.RowResource: GET 
> http://localhost:8080/api/userstable
> 2011-08-25 15:10:56,762 INFO org.apache.zookeeper.ZooKeeper:
> Initiating client connection, connectString=localhost:2181 
> sessionTimeout=180000 watcher=hconnection
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Opening 
> socket connection to server localhost/10.33.100.107:2181
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Socket 
> connection established to localhost/10.33.100.107:2181, initiating 
> session
> 2011-08-25 15:10:56,778 INFO org.apache.zookeeper.ClientCnxn: Session 
> establishment complete on server localhost/10.33.100.107:2181, 
> sessionid = 0x131fc710262001f, negotiated timeout = 40000
> 2011-08-25 15:10:56,790 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Lookedup root region location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnecti
> onImplemen
> tation@1acee78; hsa=localhost:36169
> 2011-08-25 15:10:56,791 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,803 WARN
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Encountered problems when prefetch META table:
> org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in
.META.
> for
> table: api, row=api,,99999999999999
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136
)
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.pref
> etchRegionCache(HConnectionManager.java:648)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:702)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
> org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
> ........................
> 2011-08-25 15:10:56,807 ERROR org.mortbay.log: /api/userstable
> java.lang.RuntimeException:
org.apache.hadoop.hbase.TableNotFoundException:
> api
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:38)
>            at
>
org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:1
33)
>            at
> org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:89)
>            at org.apache.hadoop.hbase.rest.RowResultGenerator.<init>
> (RowResultGenerator.java:49)
>            at
>
> org.apache.hadoop.hbase.rest.ResultGenerator.fromRowSpec(ResultGenerat
> or.java:35
> )
>            at
> org.apache.hadoop.hbase.rest.RowResource.get(RowResource.java:85)
>            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) ................
> Caused by: org.apache.hadoop.hbase.TableNotFoundException: api
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:724)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:36)
>            ... 43 more
>
>
> I am able to hit http://localhost:8080 from the browser and it gives 
> me all the tables present.I have no clue why it is adding 
> /api/userstable in the url .
>
> Please tell me how can I resolve it or if there is some other forum to

> which I can point this issue.
>
> Thanks
>
>
>
>

::DISCLAIMER::
------------------------------------------------------------------------
-----------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in this email are solely
those of the author and may not necessarily reflect the opinions of HCL
or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this message without
the prior written consent of the author of this e-mail is strictly
prohibited. If you have received this email in error please delete it
and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

------------------------------------------------------------------------
-----------------------------------------------

This message, including any attachments, is the property of Sears
Holdings Corporation and/or one of its subsidiaries. It is confidential
and may contain proprietary or legally privileged information. If you
are not the intended recipient, please delete it without reading the
contents. Thank you.

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

RE: rest web service with hbase

Posted by Stuti Awasthi <st...@hcl.com>.
Hi Zhong,

Are you using Ruby for the development or Java ?

-----Original Message-----
From: Zhong, Andy [mailto:Sheng.Zhong@searshc.com] 
Sent: Friday, August 26, 2011 10:04 AM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

The Resteasy web services has been used by us to handle realtime multi-threaded write/reading from Hbase, and the performance is quite decent. 

-----Original Message-----
From: Stuti Awasthi [mailto:stutiawasthi@hcl.com]
Sent: Thursday, August 25, 2011 11:20 PM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

Hi Vincent,
 We also started looking at Massive record and thrift interface. It is working quite smoothly till now but I was just wondering that we have to pass through many interface layers to access Hbase ( like ruby client -> rails -> massive record -> thrift -> Hbase and vice versa )

For the small application performance is fine but what about the performance with big data applications. Are these not slowing the client
- server interaction to some extent.

Please put your thoughts on this.

Thanks


-----Original Message-----
From: vincent.peres@gmail.com [mailto:vincent.peres@gmail.com]
Sent: Thursday, August 25, 2011 4:25 PM
To: user@hbase.apache.org
Subject: Re: rest web service with hbase

Hi,

I don't really know about the REST client but here at Companybook we are using MassiveRecord, which provides a basic thrift wrapper and an ORM if you want to go further.
It's really advanced and work with the latest HBase (I see that HBase client hasn't been updated since 2 years now... HBase got massive updates since that time).

Hope that help!


On Thu, Aug 25, 2011 at 11:59 AM, stuti <st...@hcl.com> wrote:

>
> Hi friends,
>
> I am stuck with my development as I want my ruby client should 
> interact with REST interface to connect to Hbase. To attain this I 
> installed sishen-hbase-ruby gem and hbase-ruby gem on my Ubuntu box.
> I tried to query a  table present in Hbase using the following code 
> but it is giving error.
>
> Code snippet :
>
> require 'rubygems'
> require 'hbase'
>
> client = HBase::Client.new("http://localhost:8080/")            # this
url
> is
> the default.
> table = client.show_table('userstable')                       # show
the
> meta
> info of table users
>
> Error on Console :
>
> /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:9:in `rescue in
show_table':
> Table
> 'userstable' Not found (HBase::TableNotFoundError)
>        from /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:5:in `show_table'
>        from /home/hadoop/Hbase_Script/Test.rb:10:in `<main>'
>
> Error in Hbase Rest server logs :
>
> 2011-08-25 15:10:56,701 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,728 DEBUG
> org.apache.hadoop.hbase.rest.RowResource: GET 
> http://localhost:8080/api/userstable
> 2011-08-25 15:10:56,762 INFO org.apache.zookeeper.ZooKeeper:
> Initiating client connection, connectString=localhost:2181
> sessionTimeout=180000 watcher=hconnection
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Opening 
> socket connection to server localhost/10.33.100.107:2181
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Socket 
> connection established to localhost/10.33.100.107:2181, initiating 
> session
> 2011-08-25 15:10:56,778 INFO org.apache.zookeeper.ClientCnxn: Session 
> establishment complete on server localhost/10.33.100.107:2181, 
> sessionid = 0x131fc710262001f, negotiated timeout = 40000
> 2011-08-25 15:10:56,790 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Lookedup root region location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnecti
> onImplemen
> tation@1acee78; hsa=localhost:36169
> 2011-08-25 15:10:56,791 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,803 WARN
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Encountered problems when prefetch META table:
> org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in
.META.
> for
> table: api, row=api,,99999999999999
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136
)
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.pref
> etchRegionCache(HConnectionManager.java:648)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:702)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
> org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
> ........................
> 2011-08-25 15:10:56,807 ERROR org.mortbay.log: /api/userstable
> java.lang.RuntimeException:
org.apache.hadoop.hbase.TableNotFoundException:
> api
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:38)
>            at
>
org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:1
33)
>            at
> org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:89)
>            at org.apache.hadoop.hbase.rest.RowResultGenerator.<init>
> (RowResultGenerator.java:49)
>            at
>
> org.apache.hadoop.hbase.rest.ResultGenerator.fromRowSpec(ResultGenerat
> or.java:35
> )
>            at
> org.apache.hadoop.hbase.rest.RowResource.get(RowResource.java:85)
>            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) ................
> Caused by: org.apache.hadoop.hbase.TableNotFoundException: api
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:724)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:36)
>            ... 43 more
>
>
> I am able to hit http://localhost:8080 from the browser and it gives 
> me all the tables present.I have no clue why it is adding 
> /api/userstable in the url .
>
> Please tell me how can I resolve it or if there is some other forum to

> which I can point this issue.
>
> Thanks
>
>
>
>

::DISCLAIMER::
------------------------------------------------------------------------
-----------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect.

------------------------------------------------------------------------
-----------------------------------------------

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

RE: rest web service with hbase

Posted by "Zhong, Andy" <Sh...@searshc.com>.
The Resteasy web services has been used by us to handle realtime
multi-threaded write/reading from Hbase, and the performance is quite
decent. 

-----Original Message-----
From: Stuti Awasthi [mailto:stutiawasthi@hcl.com] 
Sent: Thursday, August 25, 2011 11:20 PM
To: user@hbase.apache.org
Subject: RE: rest web service with hbase

Hi Vincent,
 We also started looking at Massive record and thrift interface. It is
working quite smoothly till now but I was just wondering that we have to
pass through many interface layers to access Hbase ( like ruby client ->
rails -> massive record -> thrift -> Hbase and vice versa )

For the small application performance is fine but what about the
performance with big data applications. Are these not slowing the client
- server interaction to some extent.

Please put your thoughts on this.

Thanks


-----Original Message-----
From: vincent.peres@gmail.com [mailto:vincent.peres@gmail.com]
Sent: Thursday, August 25, 2011 4:25 PM
To: user@hbase.apache.org
Subject: Re: rest web service with hbase

Hi,

I don't really know about the REST client but here at Companybook we are
using MassiveRecord, which provides a basic thrift wrapper and an ORM if
you want to go further.
It's really advanced and work with the latest HBase (I see that HBase
client hasn't been updated since 2 years now... HBase got massive
updates since that time).

Hope that help!


On Thu, Aug 25, 2011 at 11:59 AM, stuti <st...@hcl.com> wrote:

>
> Hi friends,
>
> I am stuck with my development as I want my ruby client should 
> interact with REST interface to connect to Hbase. To attain this I 
> installed sishen-hbase-ruby gem and hbase-ruby gem on my Ubuntu box.
> I tried to query a  table present in Hbase using the following code 
> but it is giving error.
>
> Code snippet :
>
> require 'rubygems'
> require 'hbase'
>
> client = HBase::Client.new("http://localhost:8080/")            # this
url
> is
> the default.
> table = client.show_table('userstable')                       # show
the
> meta
> info of table users
>
> Error on Console :
>
> /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:9:in `rescue in
show_table':
> Table
> 'userstable' Not found (HBase::TableNotFoundError)
>        from /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:5:in `show_table'
>        from /home/hadoop/Hbase_Script/Test.rb:10:in `<main>'
>
> Error in Hbase Rest server logs :
>
> 2011-08-25 15:10:56,701 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,728 DEBUG
> org.apache.hadoop.hbase.rest.RowResource: GET 
> http://localhost:8080/api/userstable
> 2011-08-25 15:10:56,762 INFO org.apache.zookeeper.ZooKeeper:
> Initiating client connection, connectString=localhost:2181 
> sessionTimeout=180000 watcher=hconnection
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Opening 
> socket connection to server localhost/10.33.100.107:2181
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Socket 
> connection established to localhost/10.33.100.107:2181, initiating 
> session
> 2011-08-25 15:10:56,778 INFO org.apache.zookeeper.ClientCnxn: Session 
> establishment complete on server localhost/10.33.100.107:2181, 
> sessionid = 0x131fc710262001f, negotiated timeout = 40000
> 2011-08-25 15:10:56,790 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Lookedup root region location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnecti
> onImplemen
> tation@1acee78; hsa=localhost:36169
> 2011-08-25 15:10:56,791 DEBUG
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,803 WARN
>
>
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementat
ion:
> Encountered problems when prefetch META table:
> org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in
.META.
> for
> table: api, row=api,,99999999999999
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136
)
>            at
>
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.pref
> etchRegionCache(HConnectionManager.java:648)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:702)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
> org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
> ........................
> 2011-08-25 15:10:56,807 ERROR org.mortbay.log: /api/userstable
> java.lang.RuntimeException:
org.apache.hadoop.hbase.TableNotFoundException:
> api
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:38)
>            at
>
org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:1
33)
>            at
> org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:89)
>            at org.apache.hadoop.hbase.rest.RowResultGenerator.<init>
> (RowResultGenerator.java:49)
>            at
>
> org.apache.hadoop.hbase.rest.ResultGenerator.fromRowSpec(ResultGenerat
> or.java:35
> )
>            at
> org.apache.hadoop.hbase.rest.RowResource.get(RowResource.java:85)
>            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) ................
> Caused by: org.apache.hadoop.hbase.TableNotFoundException: api
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:724)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:36)
>            ... 43 more
>
>
> I am able to hit http://localhost:8080 from the browser and it gives 
> me all the tables present.I have no clue why it is adding 
> /api/userstable in the url .
>
> Please tell me how can I resolve it or if there is some other forum to

> which I can point this issue.
>
> Thanks
>
>
>
>

::DISCLAIMER::
------------------------------------------------------------------------
-----------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in this email are solely
those of the author and may not necessarily reflect the opinions of HCL
or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this message without
the prior written consent of the author of this e-mail is strictly
prohibited. If you have received this email in error please delete it
and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

------------------------------------------------------------------------
-----------------------------------------------

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

RE: rest web service with hbase

Posted by Stuti Awasthi <st...@hcl.com>.
Hi Vincent,
 We also started looking at Massive record and thrift interface. It is working quite smoothly till now but I was just wondering that we have to pass through many interface layers to access Hbase ( like ruby client -> rails -> massive record -> thrift -> Hbase and vice versa )

For the small application performance is fine but what about the performance with big data applications. Are these not slowing the client - server interaction to some extent.

Please put your thoughts on this.

Thanks


-----Original Message-----
From: vincent.peres@gmail.com [mailto:vincent.peres@gmail.com]
Sent: Thursday, August 25, 2011 4:25 PM
To: user@hbase.apache.org
Subject: Re: rest web service with hbase

Hi,

I don't really know about the REST client but here at Companybook we are using MassiveRecord, which provides a basic thrift wrapper and an ORM if you want to go further.
It's really advanced and work with the latest HBase (I see that HBase client hasn't been updated since 2 years now... HBase got massive updates since that time).

Hope that help!


On Thu, Aug 25, 2011 at 11:59 AM, stuti <st...@hcl.com> wrote:

>
> Hi friends,
>
> I am stuck with my development as I want my ruby client should
> interact with REST interface to connect to Hbase. To attain this I
> installed sishen-hbase-ruby gem and hbase-ruby gem on my Ubuntu box.
> I tried to query a  table present in Hbase using the following code
> but it is giving error.
>
> Code snippet :
>
> require 'rubygems'
> require 'hbase'
>
> client = HBase::Client.new("http://localhost:8080/")            # this url
> is
> the default.
> table = client.show_table('userstable')                       # show the
> meta
> info of table users
>
> Error on Console :
>
> /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:9:in `rescue in show_table':
> Table
> 'userstable' Not found (HBase::TableNotFoundError)
>        from /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:5:in `show_table'
>        from /home/hadoop/Hbase_Script/Test.rb:10:in `<main>'
>
> Error in Hbase Rest server logs :
>
> 2011-08-25 15:10:56,701 DEBUG
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,728 DEBUG
> org.apache.hadoop.hbase.rest.RowResource: GET
> http://localhost:8080/api/userstable
> 2011-08-25 15:10:56,762 INFO org.apache.zookeeper.ZooKeeper:
> Initiating client connection, connectString=localhost:2181
> sessionTimeout=180000 watcher=hconnection
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Opening
> socket connection to server localhost/10.33.100.107:2181
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Socket
> connection established to localhost/10.33.100.107:2181, initiating
> session
> 2011-08-25 15:10:56,778 INFO org.apache.zookeeper.ClientCnxn: Session
> establishment complete on server localhost/10.33.100.107:2181,
> sessionid = 0x131fc710262001f, negotiated timeout = 40000
> 2011-08-25 15:10:56,790 DEBUG
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Lookedup root region location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnecti
> onImplemen
> tation@1acee78; hsa=localhost:36169
> 2011-08-25 15:10:56,791 DEBUG
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,803 WARN
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Encountered problems when prefetch META table:
> org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META.
> for
> table: api, row=api,,99999999999999
>            at
> org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136)
>            at
> org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.pref
> etchRegionCache(HConnectionManager.java:648)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:702)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at
> org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
> ........................
> 2011-08-25 15:10:56,807 ERROR org.mortbay.log: /api/userstable
> java.lang.RuntimeException: org.apache.hadoop.hbase.TableNotFoundException:
> api
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:38)
>            at
> org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:133)
>            at
> org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:89)
>            at org.apache.hadoop.hbase.rest.RowResultGenerator.<init>
> (RowResultGenerator.java:49)
>            at
>
> org.apache.hadoop.hbase.rest.ResultGenerator.fromRowSpec(ResultGenerat
> or.java:35
> )
>            at
> org.apache.hadoop.hbase.rest.RowResource.get(RowResource.java:85)
>            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) ................
> Caused by: org.apache.hadoop.hbase.TableNotFoundException: api
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegionInMeta(HConnectionManager.java:724)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplement
> ation.loca
> teRegion(HConnectionManager.java:558)
>            at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTa
> bleFactory
> .java:36)
>            ... 43 more
>
>
> I am able to hit http://localhost:8080 from the browser and it gives
> me all the tables present.I have no clue why it is adding
> /api/userstable in the url .
>
> Please tell me how can I resolve it or if there is some other forum to
> which I can point this issue.
>
> Thanks
>
>
>
>

::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

Re: rest web service with hbase

Posted by "vincent.peres@gmail.com" <vi...@gmail.com>.
Hi,

I don't really know about the REST client but here at Companybook we are
using MassiveRecord, which provides a basic thrift wrapper and an ORM if you
want to go further.
It's really advanced and work with the latest HBase (I see that HBase client
hasn't been updated since 2 years now... HBase got massive updates since
that time).

Hope that help!


On Thu, Aug 25, 2011 at 11:59 AM, stuti <st...@hcl.com> wrote:

>
> Hi friends,
>
> I am stuck with my development as I want my ruby client should interact
> with
> REST interface to connect to Hbase. To attain this I installed
> sishen-hbase-ruby
> gem and hbase-ruby gem on my Ubuntu box.
> I tried to query a  table present in Hbase using the following code but it
> is
> giving error.
>
> Code snippet :
>
> require 'rubygems'
> require 'hbase'
>
> client = HBase::Client.new("http://localhost:8080/")            # this url
> is
> the default.
> table = client.show_table('userstable')                       # show the
> meta
> info of table users
>
> Error on Console :
>
> /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:9:in `rescue in show_table':
> Table
> 'userstable' Not found (HBase::TableNotFoundError)
>        from /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
> 1.0/lib/hbase/operation/table_operation.rb:5:in `show_table'
>        from /home/hadoop/Hbase_Script/Test.rb:10:in `<main>'
>
> Error in Hbase Rest server logs :
>
> 2011-08-25 15:10:56,701 DEBUG
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,728 DEBUG org.apache.hadoop.hbase.rest.RowResource: GET
> http://localhost:8080/api/userstable
> 2011-08-25 15:10:56,762 INFO org.apache.zookeeper.ZooKeeper: Initiating
> client
> connection, connectString=localhost:2181 sessionTimeout=180000
> watcher=hconnection
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Opening
> socket
> connection to server localhost/10.33.100.107:2181
> 2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Socket
> connection
> established to localhost/10.33.100.107:2181, initiating session
> 2011-08-25 15:10:56,778 INFO org.apache.zookeeper.ClientCnxn: Session
> establishment complete on server localhost/10.33.100.107:2181, sessionid =
> 0x131fc710262001f, negotiated timeout = 40000
> 2011-08-25 15:10:56,790 DEBUG
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Lookedup root region location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplemen
> tation@1acee78; hsa=localhost:36169
> 2011-08-25 15:10:56,791 DEBUG
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Cached location for .META.,,1.1028785192 is localhost:36169
> 2011-08-25 15:10:56,803 WARN
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation:
> Encountered problems when prefetch META table:
> org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META.
> for
> table: api, row=api,,99999999999999
>            at
> org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136)
>            at
> org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.pref
> etchRegionCache(HConnectionManager.java:648)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
> teRegionInMeta(HConnectionManager.java:702)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
> teRegion(HConnectionManager.java:558)
>            at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
> ……………………
> 2011-08-25 15:10:56,807 ERROR org.mortbay.log: /api/userstable
> java.lang.RuntimeException: org.apache.hadoop.hbase.TableNotFoundException:
> api
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTableFactory
> .java:38)
>            at
> org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:133)
>            at
> org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:89)
>            at org.apache.hadoop.hbase.rest.RowResultGenerator.<init>
> (RowResultGenerator.java:49)
>            at
>
> org.apache.hadoop.hbase.rest.ResultGenerator.fromRowSpec(ResultGenerator.java:35
> )
>            at
> org.apache.hadoop.hbase.rest.RowResource.get(RowResource.java:85)
>            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> …………….
> Caused by: org.apache.hadoop.hbase.TableNotFoundException: api
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
> teRegionInMeta(HConnectionManager.java:724)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
> teRegion(HConnectionManager.java:593)
>            at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
> teRegion(HConnectionManager.java:558)
>            at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
>            at
>
> org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTableFactory
> .java:36)
>            ... 43 more
>
>
> I am able to hit http://localhost:8080 from the browser and it gives me
> all the
> tables present.I have no clue why it is adding /api/userstable in the url .
>
> Please tell me how can I resolve it or if there is some other forum to
> which I
> can point this issue.
>
> Thanks
>
>
>
>

Re: rest web service with hbase

Posted by stuti <st...@hcl.com>.
Hi friends,

I am stuck with my development as I want my ruby client should interact with 
REST interface to connect to Hbase. To attain this I installed sishen-hbase-ruby 
gem and hbase-ruby gem on my Ubuntu box. 
I tried to query a  table present in Hbase using the following code but it is 
giving error.

Code snippet :

require 'rubygems'
require 'hbase'

client = HBase::Client.new("http://localhost:8080/")            # this url is 
the default.
table = client.show_table('userstable')                       # show the meta 
info of table users 

Error on Console : 

/usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
1.0/lib/hbase/operation/table_operation.rb:9:in `rescue in show_table': Table 
'userstable' Not found (HBase::TableNotFoundError)
        from /usr/local/lib/ruby/gems/1.9.1/gems/sishen-hbase-ruby-
1.0/lib/hbase/operation/table_operation.rb:5:in `show_table'
        from /home/hadoop/Hbase_Script/Test.rb:10:in `<main>'

Error in Hbase Rest server logs :

2011-08-25 15:10:56,701 DEBUG 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: 
Cached location for .META.,,1.1028785192 is localhost:36169
2011-08-25 15:10:56,728 DEBUG org.apache.hadoop.hbase.rest.RowResource: GET 
http://localhost:8080/api/userstable
2011-08-25 15:10:56,762 INFO org.apache.zookeeper.ZooKeeper: Initiating client 
connection, connectString=localhost:2181 sessionTimeout=180000 
watcher=hconnection
2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Opening socket 
connection to server localhost/10.33.100.107:2181
2011-08-25 15:10:56,765 INFO org.apache.zookeeper.ClientCnxn: Socket connection 
established to localhost/10.33.100.107:2181, initiating session
2011-08-25 15:10:56,778 INFO org.apache.zookeeper.ClientCnxn: Session 
establishment complete on server localhost/10.33.100.107:2181, sessionid = 
0x131fc710262001f, negotiated timeout = 40000
2011-08-25 15:10:56,790 DEBUG 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: 
Lookedup root region location, 
connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplemen
tation@1acee78; hsa=localhost:36169
2011-08-25 15:10:56,791 DEBUG 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: 
Cached location for .META.,,1.1028785192 is localhost:36169
2011-08-25 15:10:56,803 WARN 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: 
Encountered problems when prefetch META table: 
org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META. for 
table: api, row=api,,99999999999999
            at 
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:136)
            at 
org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:95)
            at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.pref
etchRegionCache(HConnectionManager.java:648)
            at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
teRegionInMeta(HConnectionManager.java:702)
            at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
teRegion(HConnectionManager.java:593)
            at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
teRegion(HConnectionManager.java:558)
            at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
……………………
2011-08-25 15:10:56,807 ERROR org.mortbay.log: /api/userstable
java.lang.RuntimeException: org.apache.hadoop.hbase.TableNotFoundException: api
            at 
org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTableFactory
.java:38)
            at 
org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:133)
            at 
org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:89)
            at org.apache.hadoop.hbase.rest.RowResultGenerator.<init>
(RowResultGenerator.java:49)
            at 
org.apache.hadoop.hbase.rest.ResultGenerator.fromRowSpec(ResultGenerator.java:35
)
            at org.apache.hadoop.hbase.rest.RowResource.get(RowResource.java:85)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
…………….
Caused by: org.apache.hadoop.hbase.TableNotFoundException: api
            at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
teRegionInMeta(HConnectionManager.java:724)
            at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
teRegion(HConnectionManager.java:593)
            at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.loca
teRegion(HConnectionManager.java:558)
            at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
            at 
org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTableFactory
.java:36)
            ... 43 more


I am able to hit http://localhost:8080 from the browser and it gives me all the 
tables present.I have no clue why it is adding /api/userstable in the url .

Please tell me how can I resolve it or if there is some other forum to which I 
can point this issue.

Thanks




Re: rest web service with hbase

Posted by Dingding Ye <ye...@gmail.com>.
On Wed, Oct 22, 2008 at 5:47 PM, chandravadana <
Chandravadana.Selvachamy@cognizant.com> wrote:

>
> hi sishen
>
> i went thro http://wiki.apache.org/hadoop/Hbase/HbaseRest page..
> i'm unable to get a detailed view of it..
> is there any other site available..
>
> is there any jdbc driver for hbase..


Not sure. But there is one DAO implementation in java.  You can search the
list.


>
>
>
>
> sishen wrote:
> >
> > Hi, chandra.
> >
> > You can read the info in the page:
> > http://wiki.apache.org/hadoop/Hbase/HbaseRest
> >
> > Also, if you use ruby, you can also try my gem:
> > http://github.com/sishen/hbase-ruby/tree/master
> >
> > On Wed, Oct 22, 2008 at 2:23 PM, chandra <
> > chandravadana.selvachamy@cognizant.com> wrote:
> >
> >>
> >> hi..
> >>
> >> i'm new to hbase.. i'm try to do restful web service that uses hbase.
> >>
> >> can anyone detail on how to connect restful web service to hbase.
> >> and
> >> i unable to find links that contain some examples of them.. kindly post
> >> some links on that..
> >>
> >> --
> >> Thank you
> >> S.Chandravadana
> >>
> >>
> >> This e-mail and any files transmitted with it are for the sole use of
> the
> >> intended recipient(s) and may contain confidential and privileged
> >> information.
> >> If you are not the intended recipient, please contact the sender by
> reply
> >> e-mail and destroy all copies of the original message.
> >> Any unauthorized review, use, disclosure, dissemination, forwarding,
> >> printing or copying of this email or any action taken in reliance on
> this
> >> e-mail is strictly
> >> prohibited and may be unlawful.
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/rest-web-service-with-hbase-tp20104688p20107279.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>

Re: rest web service with hbase

Posted by stack <st...@duboce.net>.
chandravadana wrote:
> hi sishen
>
> i went thro http://wiki.apache.org/hadoop/Hbase/HbaseRest page..
> i'm unable to get a detailed view of it..
>   
That page is full of detail on how the communication works with examples 
toward the bottom of the page?  What do you need?

> is there any jdbc driver for hbase..
>
>   
No. HBase does not support SQL so it makes little sense.

St.Ack

Re: rest web service with hbase

Posted by chandravadana <Ch...@cognizant.com>.
hi sishen

i went thro http://wiki.apache.org/hadoop/Hbase/HbaseRest page..
i'm unable to get a detailed view of it..
is there any other site available..

is there any jdbc driver for hbase..



sishen wrote:
> 
> Hi, chandra.
> 
> You can read the info in the page:
> http://wiki.apache.org/hadoop/Hbase/HbaseRest
> 
> Also, if you use ruby, you can also try my gem:
> http://github.com/sishen/hbase-ruby/tree/master
> 
> On Wed, Oct 22, 2008 at 2:23 PM, chandra <
> chandravadana.selvachamy@cognizant.com> wrote:
> 
>>
>> hi..
>>
>> i'm new to hbase.. i'm try to do restful web service that uses hbase.
>>
>> can anyone detail on how to connect restful web service to hbase.
>> and
>> i unable to find links that contain some examples of them.. kindly post
>> some links on that..
>>
>> --
>> Thank you
>> S.Chandravadana
>>
>>
>> This e-mail and any files transmitted with it are for the sole use of the
>> intended recipient(s) and may contain confidential and privileged
>> information.
>> If you are not the intended recipient, please contact the sender by reply
>> e-mail and destroy all copies of the original message.
>> Any unauthorized review, use, disclosure, dissemination, forwarding,
>> printing or copying of this email or any action taken in reliance on this
>> e-mail is strictly
>> prohibited and may be unlawful.
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/rest-web-service-with-hbase-tp20104688p20107279.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: rest web service with hbase

Posted by stack <st...@duboce.net>.
Dingding Ye wrote:
> Also, if you use ruby, you can also try my gem:
> http://github.com/sishen/hbase-ruby/tree/master
Sishen:

Would suggest you add a link to your hbase-ruby either to the hbase rest 
page or to related projects on hbase wiki home page (or in both 
places).  It looks great.

St.Ack

Re: rest web service with hbase

Posted by Dingding Ye <ye...@gmail.com>.
Hi, chandra.

You can read the info in the page:
http://wiki.apache.org/hadoop/Hbase/HbaseRest

Also, if you use ruby, you can also try my gem:
http://github.com/sishen/hbase-ruby/tree/master

On Wed, Oct 22, 2008 at 2:23 PM, chandra <
chandravadana.selvachamy@cognizant.com> wrote:

>
> hi..
>
> i'm new to hbase.. i'm try to do restful web service that uses hbase.
>
> can anyone detail on how to connect restful web service to hbase.
> and
> i unable to find links that contain some examples of them.. kindly post
> some links on that..
>
> --
> Thank you
> S.Chandravadana
>
>
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information.
> If you are not the intended recipient, please contact the sender by reply
> e-mail and destroy all copies of the original message.
> Any unauthorized review, use, disclosure, dissemination, forwarding,
> printing or copying of this email or any action taken in reliance on this
> e-mail is strictly
> prohibited and may be unlawful.
>

Re: rest web service with hbase

Posted by Michael Bieniosek <mi...@powerset.com>.
http://wiki.apache.org/hadoop/Hbase/HbaseRest


On 10/21/08 11:23 PM, "chandra" <ch...@cognizant.com> wrote:



hi..

i'm new to hbase.. i'm try to do restful web service that uses hbase.

can anyone detail on how to connect restful web service to hbase.
and
i unable to find links that contain some examples of them.. kindly post
some links on that..

--
Thank you
S.Chandravadana


This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.