hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhong, Andy" <Sheng.Zh...@searshc.com>
Subject RE: rest web service with hbase
Date Fri, 26 Aug 2011 04:33:53 GMT
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 <stutiawasthi@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.

Mime
View raw message