You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Shuja Rehman <sh...@gmail.com> on 2010/09/01 02:30:04 UTC

Re: Getting data from Hbase from client/remote computer

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 <st...@duboce.net> wrote:

> On Tue, Aug 31, 2010 at 12:54 PM, Shuja Rehman <sh...@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 <st...@duboce.net> wrote:
> >
> >> On Tue, Aug 31, 2010 at 12:38 AM, Shuja Rehman <sh...@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

Re: Getting data from Hbase from client/remote computer

Posted by Shuja Rehman <sh...@gmail.com>.
Stack,

This problem is already resolved, now can u check the new problem of
connecting to local ip as explained earlier

Thanks

On Wed, Sep 1, 2010 at 8:27 AM, Stack <st...@duboce.net> wrote:

> On Tue, Aug 31, 2010 at 5:30 PM, Shuja Rehman <sh...@gmail.com>
> wrote:
> > HBaseConfiguration#create() to construct a plain Configuration
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > org/apache/zookeeper/KeeperException
>
> As it says, NoClassDefFoundError.  Try adding zookeeper jar to your
> CLASSPATH.
> St.Ack
>



-- 
Regards
Shuja-ur-Rehman Baig
http://pk.linkedin.com/in/shujamughal
Cell: +92 3214207445

Re: Getting data from Hbase from client/remote computer

Posted by Stack <st...@duboce.net>.
On Tue, Aug 31, 2010 at 5:30 PM, Shuja Rehman <sh...@gmail.com> wrote:
> HBaseConfiguration#create() to construct a plain Configuration
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/zookeeper/KeeperException

As it says, NoClassDefFoundError.  Try adding zookeeper jar to your CLASSPATH.
St.Ack

Re: Getting data from Hbase from client/remote computer

Posted by Shuja Rehman <sh...@gmail.com>.
Hi Imran

I have used these configuration settings and include the zoo keeper and
log4j jars also in class path.

HBaseConfiguration config = new HBaseConfiguration();
  config.clear();
  config.set("hbase.zookeeper.quorum", "myserver.mycompany.com:2181");
  config.set("hbase.zookeeper.property.clientPort","2181");

It resolve the previous problem but now new problem occurs. The new problem
is its trying to connect to local ip address

INFO zookeeper.ZooKeeper: Initiating client connection, connectString=
myserver.mycompany.com:2181 sessionTimeout=60000
watcher=org.apache.hadoop.hbase.client.HConnectionManager$ClientZKWatcher@fd54d6
10/08/31 20:27:33 INFO zookeeper.ClientCnxn: Opening socket connection to
server myserver.mycompany.com/20314.166.12:2181
10/08/31 20:27:33 INFO zookeeper.ClientCnxn: Socket connection established
to myserver.mycompany.com/203.14.166.12:2181, initiating session
10/08/31 20:27:34 INFO zookeeper.ClientCnxn: Session establishment complete
on server myserver.mycompany.com/203.14.166.12:2181,  sessionid =
0x12acaa705e30004, negotiated timeout = 40000

10/08/31 20:27:54 INFO ipc.HbaseRPC: Problem connecting to server: /
10.0.3.85:60020
10/08/31 20:28:15 INFO ipc.HbaseRPC: Problem connecting to server: /
10.0.3.85:60020
10/08/31 20:28:36 INFO ipc.HbaseRPC: Problem connecting to server: /
10.0.3.85:60020

but it should try to connect to global ip not local ip. so now need to
resolve this issue. Anybody there to help me out??

Thanks

On Wed, Sep 1, 2010 at 6:37 AM, Imran M Yousuf <im...@gmail.com> wrote:

> 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 <sh...@gmail.com>
> wrote:
> > Hi Stack
> >
> > I have solved this problem
> > Thanks
> > On Wed, Sep 1, 2010 at 5:30 AM, Shuja Rehman <sh...@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 <st...@duboce.net> wrote:
> >>
> >>> On Tue, Aug 31, 2010 at 12:54 PM, Shuja Rehman <sh...@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 <st...@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
>



-- 
Regards
Shuja-ur-Rehman Baig
http://pk.linkedin.com/in/shujamughal
Cell: +92 3214207445

Re: Getting data from Hbase from client/remote computer

Posted by Imran M Yousuf <im...@gmail.com>.
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 <sh...@gmail.com> wrote:
> Hi Stack
>
> I have solved this problem
> Thanks
> On Wed, Sep 1, 2010 at 5:30 AM, Shuja Rehman <sh...@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 <st...@duboce.net> wrote:
>>
>>> On Tue, Aug 31, 2010 at 12:54 PM, Shuja Rehman <sh...@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 <st...@duboce.net> wrote:
>>> >
>>> >> On Tue, Aug 31, 2010 at 12:38 AM, Shuja Rehman <sh...@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

Re: Getting data from Hbase from client/remote computer

Posted by Shuja Rehman <sh...@gmail.com>.
Hi Stack

I have solved this problem
Thanks
On Wed, Sep 1, 2010 at 5:30 AM, Shuja Rehman <sh...@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 <st...@duboce.net> wrote:
>
>> On Tue, Aug 31, 2010 at 12:54 PM, Shuja Rehman <sh...@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 <st...@duboce.net> wrote:
>> >
>> >> On Tue, Aug 31, 2010 at 12:38 AM, Shuja Rehman <sh...@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