Re: hbase java change baseZNode

2016-08-01 Thread kevin
val conf = HBaseConfiguration.create()
conf.set("hbase.zookeeper.property.clientPort", "2181")
conf.set("hbase.zookeeper.quorum", zkQuorum)
conf.set("zookeeper.znode.parent","/hbase-unsecure")

val connection = ConnectionFactory.createConnection(conf);

It's really worked.

2016-08-01 18:41 GMT+08:00 Ted Yu :

> As mentioned in Kevin's first email, if /hbase-unsecure is the znode used
> by Ambari, setting zookeeper.znode.parent to hbase (or /hbase) wouldn't
> help.
>
> On Mon, Aug 1, 2016 at 3:39 AM, Adam Davidson <
> adam.david...@bigdatapartnership.com> wrote:
>
> > Hi Kevin,
> >
> > when creating the Configuration object for the HBase connection
> > (HBaseConfiguration.create()), you often need to set a number of
> properties
> > on the resulting object. The one you require in this case is
> > 'zookeeper.znode.parent'. Set that to 'hbase' and that should fix this
> > particular problem, though you may find other properties may need
> > attention. I believe it is all documented in the main Apache HBase docs.
> >
> > Regards,
> > Adam
> >
> > On Mon, 1 Aug 2016 at 11:36 kevin  wrote:
> >
> > > hi,all:
> > > I install hbase by ambari ,I found it's zookeeper url is
> /hbase-unsecure
> > .
> > > when I use java api to connect to hbase ,program hung up .
> > > after kill it ,I found message :
> > > WARN ZKUtil: hconnection-0x4d1d2788-0x25617464bd80032,
> > > quorum=Centosle02:2181,Centosle03:2181,Centosle01:2181,
> baseZNode=/hbase
> > > Unable to get data of znode /hbase/meta-region-server
> > > java.lang.InterruptedException
> > >
> > > it read /hbase data not  /hbase-unsecure
> > >
> >
> > --
> >
> >
> > *We're hiring!*
> >  Please check out our current positions *here*
> > *.*
> > --
> >
> > *NOTICE AND DISCLAIMER*
> >
> > This email (including attachments) is confidential. If you are not the
> > intended recipient, notify the sender immediately, delete this email from
> > your system and do not disclose or use for any purpose.
> >
> > Business Address: Eagle House, 163 City Road, London, EC1V 1NR. United
> > Kingdom
> > Registered Office: Finsgate, 5-7 Cranwood Street, London, EC1V 9EE.
> United
> > Kingdom
> > Big Data Partnership Limited is a company registered in England & Wales
> > with Company No 7904824
> >
>


Re: hbase java change baseZNode

2016-08-01 Thread Ted Yu
As mentioned in Kevin's first email, if /hbase-unsecure is the znode used
by Ambari, setting zookeeper.znode.parent to hbase (or /hbase) wouldn't
help.

On Mon, Aug 1, 2016 at 3:39 AM, Adam Davidson <
adam.david...@bigdatapartnership.com> wrote:

> Hi Kevin,
>
> when creating the Configuration object for the HBase connection
> (HBaseConfiguration.create()), you often need to set a number of properties
> on the resulting object. The one you require in this case is
> 'zookeeper.znode.parent'. Set that to 'hbase' and that should fix this
> particular problem, though you may find other properties may need
> attention. I believe it is all documented in the main Apache HBase docs.
>
> Regards,
> Adam
>
> On Mon, 1 Aug 2016 at 11:36 kevin  wrote:
>
> > hi,all:
> > I install hbase by ambari ,I found it's zookeeper url is /hbase-unsecure
> .
> > when I use java api to connect to hbase ,program hung up .
> > after kill it ,I found message :
> > WARN ZKUtil: hconnection-0x4d1d2788-0x25617464bd80032,
> > quorum=Centosle02:2181,Centosle03:2181,Centosle01:2181, baseZNode=/hbase
> > Unable to get data of znode /hbase/meta-region-server
> > java.lang.InterruptedException
> >
> > it read /hbase data not  /hbase-unsecure
> >
>
> --
>
>
> *We're hiring!*
>  Please check out our current positions *here*
> *.*
> --
>
> *NOTICE AND DISCLAIMER*
>
> This email (including attachments) is confidential. If you are not the
> intended recipient, notify the sender immediately, delete this email from
> your system and do not disclose or use for any purpose.
>
> Business Address: Eagle House, 163 City Road, London, EC1V 1NR. United
> Kingdom
> Registered Office: Finsgate, 5-7 Cranwood Street, London, EC1V 9EE. United
> Kingdom
> Big Data Partnership Limited is a company registered in England & Wales
> with Company No 7904824
>


Re: hbase java change baseZNode

2016-08-01 Thread kevin
Thank you Adam Davidson.

2016-08-01 18:39 GMT+08:00 Adam Davidson <
adam.david...@bigdatapartnership.com>:

> Hi Kevin,
>
> when creating the Configuration object for the HBase connection
> (HBaseConfiguration.create()), you often need to set a number of properties
> on the resulting object. The one you require in this case is
> 'zookeeper.znode.parent'. Set that to 'hbase' and that should fix this
> particular problem, though you may find other properties may need
> attention. I believe it is all documented in the main Apache HBase docs.
>
> Regards,
> Adam
>
> On Mon, 1 Aug 2016 at 11:36 kevin  wrote:
>
> > hi,all:
> > I install hbase by ambari ,I found it's zookeeper url is /hbase-unsecure
> .
> > when I use java api to connect to hbase ,program hung up .
> > after kill it ,I found message :
> > WARN ZKUtil: hconnection-0x4d1d2788-0x25617464bd80032,
> > quorum=Centosle02:2181,Centosle03:2181,Centosle01:2181, baseZNode=/hbase
> > Unable to get data of znode /hbase/meta-region-server
> > java.lang.InterruptedException
> >
> > it read /hbase data not  /hbase-unsecure
> >
>
> --
>
>
> *We're hiring!*
>  Please check out our current positions *here*
> *.*
> --
>
> *NOTICE AND DISCLAIMER*
>
> This email (including attachments) is confidential. If you are not the
> intended recipient, notify the sender immediately, delete this email from
> your system and do not disclose or use for any purpose.
>
> Business Address: Eagle House, 163 City Road, London, EC1V 1NR. United
> Kingdom
> Registered Office: Finsgate, 5-7 Cranwood Street, London, EC1V 9EE. United
> Kingdom
> Big Data Partnership Limited is a company registered in England & Wales
> with Company No 7904824
>


Re: hbase java change baseZNode

2016-08-01 Thread Ted Yu
How did your Java program obtain hbase-site.xml of the cluster ?

Looks like hbase-site.xml was not on the classpath.

On Mon, Aug 1, 2016 at 3:36 AM, kevin  wrote:

> hi,all:
> I install hbase by ambari ,I found it's zookeeper url is /hbase-unsecure .
> when I use java api to connect to hbase ,program hung up .
> after kill it ,I found message :
> WARN ZKUtil: hconnection-0x4d1d2788-0x25617464bd80032,
> quorum=Centosle02:2181,Centosle03:2181,Centosle01:2181, baseZNode=/hbase
> Unable to get data of znode /hbase/meta-region-server
> java.lang.InterruptedException
>
> it read /hbase data not  /hbase-unsecure
>


hbase java change baseZNode

2016-08-01 Thread kevin
hi,all:
I install hbase by ambari ,I found it's zookeeper url is /hbase-unsecure .
when I use java api to connect to hbase ,program hung up .
after kill it ,I found message :
WARN ZKUtil: hconnection-0x4d1d2788-0x25617464bd80032,
quorum=Centosle02:2181,Centosle03:2181,Centosle01:2181, baseZNode=/hbase
Unable to get data of znode /hbase/meta-region-server
java.lang.InterruptedException

it read /hbase data not  /hbase-unsecure