hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imran M Yousuf <imyou...@gmail.com>
Subject Re: Getting data from Hbase from client/remote computer
Date Wed, 01 Sep 2010 01:37:48 GMT
Hi Shuja-Ur-Rahman,

It would be nice if you would mention how you solved it in the mailing
list so that if someone else runs into the same problem they know how
to solve it.

/Imran

On Wed, Sep 1, 2010 at 7:29 AM, Shuja Rehman <shujamughal@gmail.com> wrote:
> Hi Stack
>
> I have solved this problem
> Thanks
> On Wed, Sep 1, 2010 at 5:30 AM, Shuja Rehman <shujamughal@gmail.com> wrote:
>
>> Stack,
>>
>> I have checked the example on the given link
>>
>>
>> http://hbase.apache.org/docs/r0.89.20100726/apidocs/org/apache/hadoop/hbase/client/package-summary.html#package_description
>>
>>
>> <http://hbase.apache.org/docs/r0.89.20100726/apidocs/org/apache/hadoop/hbase/client/package-summary.html#package_description>but
>> it is same as on the other documentation. Secondly I am running hbase in
>> Distributed mode. I am confused with the term Zookeeper ensemble. Do you
>> mean that i set the configuration like this
>>
>> config.set("hbase.zookeeper.quorum", "myserver.mycompany.com:2181");
>>
>> If yes, then i have tried in this way also but agian getting exceptions
>> when I write this line
>>
>>  HTable table = new HTable(config, "myTable");
>>
>> The Exception details are
>>
>> Aug 31, 2010 7:19:24 PM org.apache.hadoop.hbase.HBaseConfiguration <init>
>> WARNING: instantiating HBaseConfiguration() is deprecated. Please use
>> HBaseConfiguration#create() to construct a plain Configuration
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/zookeeper/KeeperException
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager.getClientZooKeeperWatcher(HConnectionManager.java:176)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getZooKeeperWrapper(HConnectionManager.java:1048)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRootRegion(HConnectionManager.java:1064)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:668)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:644)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:770)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:673)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:644)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:770)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:677)
>>         at
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:644)
>>         at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:134)
>>         at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:111)
>>         at MyLittleHBaseClient.main(MyLittleHBaseClient.java:28)
>> Java Result: 1
>>
>> So kindly give me some details how to resolve this issue.
>>
>> Thanks
>>
>>
>> On Wed, Sep 1, 2010 at 1:15 AM, Stack <stack@duboce.net> wrote:
>>
>>> On Tue, Aug 31, 2010 at 12:54 PM, Shuja Rehman <shujamughal@gmail.com>
>>> wrote:
>>> > Hi Stack,
>>> > I am reading the documentation from the following link
>>> > http://hbase.apache.org/docs/r0.20.6/api/index.html
>>> >
>>> > <http://hbase.apache.org/docs/r0.20.6/api/index.html>and in Example
API
>>> > Usage
>>> > they just declare the
>>> >
>>> > HBaseConfiguration config = new HBaseConfiguration();
>>> >
>>> > but did not tell how to connect to remote server. can u put some line
>>> > of code which should use to connect to remote server??
>>> >
>>> > Secondly, I am using Cloudera latest release of Hbase, Yes the first
>>> > line is warning but the next line is exception about zoo keeper.
>>> >
>>>
>>> Sounds like you are reading the documentation for 0.20.6 but using the
>>> 0.89.x that is bundled with CDH? If so, the two are not aligned.  You
>>> probably need this:
>>>
>>> http://hbase.apache.org/docs/r0.89.20100726/apidocs/overview-summary.html#overview_description
>>>
>>> For how to connect to remote server, you specify zookeeper ensemble.
>>> If you are running standalone, it'll find the in-process zookeeper
>>> instance w/o configuration.  Otherwise you are into pseudo-distributed
>>> or distributed modes both of which are covered in the cited URL -- see
>>> where zookeeper ensemble is specified.
>>>
>>> St.Ack
>>>
>>> > *Thanks*
>>> > *
>>> > *
>>> > On Tue, Aug 31, 2010 at 8:11 PM, Stack <stack@duboce.net> wrote:
>>> >
>>> >> On Tue, Aug 31, 2010 at 12:38 AM, Shuja Rehman <shujamughal@gmail.com>
>>> >> wrote:
>>> >> > Hi
>>> >> > I am trying to implement according to documentation and i also
added
>>> this
>>> >> > line to connect remote server
>>> >> >
>>> >> >  HBaseConfiguration config = new HBaseConfiguration();
>>> >> >  config.set("hbase.master", "myserver.mycompany.com:60000");
>>> >> >
>>> >>
>>> >> It looks like you are reading old documentation.  Make sure you are
>>> >> running latest hbase.  Its getting started doc is here:
>>> >>
>>> >> http://hbase.apache.org/docs/r0.20.6/
>>> >>
>>> >> In particular you point a client at a cluster by configuring the
>>> >> zookeeper ensemble its to use, not hbase.master (Thats how we used to
>>> >> do it way back long ago).
>>> >>
>>> >> It looks like you are using TRUNK.  The below is not an exception.
>>> >> Its a WARNING telling you the new way of getting an HBase
>>> >> configuration by doing HBaseConfiguration.create rather than
>>> >> instantiating an instance directly.
>>> >>
>>> >> St.Ack
>>> >>
>>> >> > but I am getting following exception
>>> >> >
>>> >> > WARNING: instantiating HBaseConfiguration() is deprecated. Please
use
>>> >> > HBaseConfiguration#create() to construct a plain Configuration
>>> >> > Exception in thread "main" java.lang.NoClassDefFoundError:
>>> >> > org/apache/zookeeper/KeeperException
>>> >> >        at
>>> >> >
>>> >>
>>> org.apache.hadoop.hbase.client.HConnectionManager.getClientZooKeeperWatcher(HConnectionManager.java:176)
>>> >> > ...
>>> >> >
>>> >> > Is anything missing??
>>> >> >
>>> >> > Thanks
>>> >> >
>>> >> >
>>> >> > On Fri, Aug 27, 2010 at 1:33 AM, Jean-Daniel Cryans <
>>> jdcryans@apache.org
>>> >> >wrote:
>>> >> >
>>> >> >> Check the documentation:
>>> >> >>
>>> >> >>
>>> >> >>
>>> >>
>>> http://hbase.apache.org/docs/r0.20.6/api/org/apache/hadoop/hbase/client/package-summary.html#overview
>>> >> >>
>>> >> >> J-D
>>> >> >>
>>> >> >> On Thu, Aug 26, 2010 at 12:41 PM, Shuja Rehman <
>>> shujamughal@gmail.com>
>>> >> >> wrote:
>>> >> >> > Hi All
>>> >> >> >
>>> >> >> > I am new to hbase client API and want to know how to get
data from
>>> >> hbase
>>> >> >> > from cleint/remote machine. The target is to develop a
java
>>> program
>>> >> which
>>> >> >> > should connect to hbase server and then get results from
it.
>>> >> >> >
>>> >> >> > Anyone have any example???
>>> >> >> >
>>> >> >> > Thanks
>>> >> >> >
>>> >> >> > --
>>> >> >> > Regards
>>> >> >> > Shuja-ur-Rehman Baig
>>> >> >> > http://pk.linkedin.com/in/shujamughal
>>> >> >> > Cell: +92 3214207445
>>> >> >> >
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Regards
>>> >> > Shuja-ur-Rehman Baig
>>> >> > http://pk.linkedin.com/in/shujamughal
>>> >> > Cell: +92 3214207445
>>> >> >
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Regards
>>> > Shuja-ur-Rehman Baig
>>> > http://pk.linkedin.com/in/shujamughal
>>> > Cell: +92 3214207445
>>> >
>>>
>>
>>
>>
>> --
>> Regards
>> Shuja-ur-Rehman Baig
>> http://pk.linkedin.com/in/shujamughal
>> Cell: +92 3214207445
>>
>
>
>
> --
> Regards
> Shuja-ur-Rehman Baig
> http://pk.linkedin.com/in/shujamughal
> Cell: +92 3214207445
>



-- 
Imran M Yousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557

Mime
View raw message