You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Demai Ni <ni...@gmail.com> on 2013/08/16 18:58:02 UTC

how to get ZooKeeperWatcher info ?

hi, folks,

I am writing some code to get the zookeeper while hbase is offline.

    conf = HBaseConfiguration.create();
    ....
    connection = HConnectionManager.getConnection(conf);
    zkw = connection.*getZooKeeperWatcher();*
    replicationZK = new ReplicationZookeeper(connection, conf, zkw);

the goal is to create a new replicationZookeeper. Well, the above code
works, except connection.getZooKeeperWatcher() is deprecated in 0.94.

Is there a way that I can complete the same logic without using the
deprecated method? many thanks

Demai

Re: how to get ZooKeeperWatcher info ?

Posted by Ted Yu <yu...@gmail.com>.
I have logged HBASE-9258 for this.

Cheers


On Fri, Aug 16, 2013 at 8:09 PM, Demai Ni <ni...@gmail.com> wrote:

> Ted, definitely +1 from me. Many thanks
>
> Demai on the run
>
> On Aug 16, 2013, at 6:35 PM, Ted Yu <yu...@gmail.com> wrote:
>
> > If there is no objection, I will file a JIRA to make the following method
> > of HConnectionManager pubic:
> >
> >    ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
> >
> >
> > On Fri, Aug 16, 2013 at 10:52 AM, Demai Ni <ni...@gmail.com> wrote:
> >
> >> Ted, thanks. I will need to find away around it. :-) ... demai
> >>
> >>
> >> On Fri, Aug 16, 2013 at 10:38 AM, Ted Yu <yu...@gmail.com> wrote:
> >>
> >>> Actually getKeepAliveZooKeeperWatcher() is currently package private.
> >>>
> >>> FYI
> >>>
> >>>
> >>> On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni <ni...@gmail.com> wrote:
> >>>
> >>>> hi, Ted,
> >>>>
> >>>> thanks. sorry that I didn't say it clearly. I am using 0.94.9 branch,
> >>> where
> >>>> the method is marked as 'Deprecated in HBase 0.94'
> >>>>
> >>>> Since getKeepAliveZooKeeperWatcher() is only in 0.95, I guess I will
> >> use
> >>>> the HConnection.getZooKeeperWatcher()for now, and move the
> >>>> getKeepAliveZooKeeperWatcher for later release.
> >>>>
> >>>> Appreciate the help.
> >>>>
> >>>> Demai
> >>>>
> >>>>
> >>>>
> >>>> On Fri, Aug 16, 2013 at 10:07 AM, Ted Yu <yu...@gmail.com> wrote:
> >>>>
> >>>>> In 0.94, I don't see deprecation information for
> >> getZooKeeperWatcher()
> >>>>>
> >>>>> In 0.95, I found:
> >>>>>     * Retrieve a shared ZooKeeperWatcher. You must close it it once
> >>>> you've
> >>>>> have finished with it.
> >>>>>     * @return The shared instance. Never returns null.
> >>>>>     */
> >>>>>    ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
> >>>>>
> >>>>>
> >>>>> On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
> >>>>>
> >>>>>> hi, folks,
> >>>>>>
> >>>>>> I am writing some code to get the zookeeper while hbase is offline.
> >>>>>>
> >>>>>>    conf = HBaseConfiguration.create();
> >>>>>>    ....
> >>>>>>    connection = HConnectionManager.getConnection(conf);
> >>>>>>    zkw = connection.*getZooKeeperWatcher();*
> >>>>>>    replicationZK = new ReplicationZookeeper(connection, conf,
> >> zkw);
> >>>>>>
> >>>>>> the goal is to create a new replicationZookeeper. Well, the above
> >>> code
> >>>>>> works, except connection.getZooKeeperWatcher() is deprecated in
> >> 0.94.
> >>>>>>
> >>>>>> Is there a way that I can complete the same logic without using the
> >>>>>> deprecated method? many thanks
> >>>>>>
> >>>>>> Demai
> >>
>

Re: how to get ZooKeeperWatcher info ?

Posted by Demai Ni <ni...@gmail.com>.
Ted, definitely +1 from me. Many thanks

Demai on the run

On Aug 16, 2013, at 6:35 PM, Ted Yu <yu...@gmail.com> wrote:

> If there is no objection, I will file a JIRA to make the following method
> of HConnectionManager pubic:
> 
>    ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
> 
> 
> On Fri, Aug 16, 2013 at 10:52 AM, Demai Ni <ni...@gmail.com> wrote:
> 
>> Ted, thanks. I will need to find away around it. :-) ... demai
>> 
>> 
>> On Fri, Aug 16, 2013 at 10:38 AM, Ted Yu <yu...@gmail.com> wrote:
>> 
>>> Actually getKeepAliveZooKeeperWatcher() is currently package private.
>>> 
>>> FYI
>>> 
>>> 
>>> On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni <ni...@gmail.com> wrote:
>>> 
>>>> hi, Ted,
>>>> 
>>>> thanks. sorry that I didn't say it clearly. I am using 0.94.9 branch,
>>> where
>>>> the method is marked as 'Deprecated in HBase 0.94'
>>>> 
>>>> Since getKeepAliveZooKeeperWatcher() is only in 0.95, I guess I will
>> use
>>>> the HConnection.getZooKeeperWatcher()for now, and move the
>>>> getKeepAliveZooKeeperWatcher for later release.
>>>> 
>>>> Appreciate the help.
>>>> 
>>>> Demai
>>>> 
>>>> 
>>>> 
>>>> On Fri, Aug 16, 2013 at 10:07 AM, Ted Yu <yu...@gmail.com> wrote:
>>>> 
>>>>> In 0.94, I don't see deprecation information for
>> getZooKeeperWatcher()
>>>>> 
>>>>> In 0.95, I found:
>>>>>     * Retrieve a shared ZooKeeperWatcher. You must close it it once
>>>> you've
>>>>> have finished with it.
>>>>>     * @return The shared instance. Never returns null.
>>>>>     */
>>>>>    ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
>>>>> 
>>>>> 
>>>>> On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
>>>>> 
>>>>>> hi, folks,
>>>>>> 
>>>>>> I am writing some code to get the zookeeper while hbase is offline.
>>>>>> 
>>>>>>    conf = HBaseConfiguration.create();
>>>>>>    ....
>>>>>>    connection = HConnectionManager.getConnection(conf);
>>>>>>    zkw = connection.*getZooKeeperWatcher();*
>>>>>>    replicationZK = new ReplicationZookeeper(connection, conf,
>> zkw);
>>>>>> 
>>>>>> the goal is to create a new replicationZookeeper. Well, the above
>>> code
>>>>>> works, except connection.getZooKeeperWatcher() is deprecated in
>> 0.94.
>>>>>> 
>>>>>> Is there a way that I can complete the same logic without using the
>>>>>> deprecated method? many thanks
>>>>>> 
>>>>>> Demai
>> 

Re: how to get ZooKeeperWatcher info ?

Posted by Ted Yu <yu...@gmail.com>.
If there is no objection, I will file a JIRA to make the following method
of HConnectionManager pubic:

    ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()


On Fri, Aug 16, 2013 at 10:52 AM, Demai Ni <ni...@gmail.com> wrote:

> Ted, thanks. I will need to find away around it. :-) ... demai
>
>
> On Fri, Aug 16, 2013 at 10:38 AM, Ted Yu <yu...@gmail.com> wrote:
>
> > Actually getKeepAliveZooKeeperWatcher() is currently package private.
> >
> > FYI
> >
> >
> > On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni <ni...@gmail.com> wrote:
> >
> > > hi, Ted,
> > >
> > > thanks. sorry that I didn't say it clearly. I am using 0.94.9 branch,
> > where
> > > the method is marked as 'Deprecated in HBase 0.94'
> > >
> > > Since getKeepAliveZooKeeperWatcher() is only in 0.95, I guess I will
> use
> > > the HConnection.getZooKeeperWatcher()for now, and move the
> > > getKeepAliveZooKeeperWatcher for later release.
> > >
> > > Appreciate the help.
> > >
> > > Demai
> > >
> > >
> > >
> > > On Fri, Aug 16, 2013 at 10:07 AM, Ted Yu <yu...@gmail.com> wrote:
> > >
> > > > In 0.94, I don't see deprecation information for
> getZooKeeperWatcher()
> > > >
> > > > In 0.95, I found:
> > > >      * Retrieve a shared ZooKeeperWatcher. You must close it it once
> > > you've
> > > > have finished with it.
> > > >      * @return The shared instance. Never returns null.
> > > >      */
> > > >     ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
> > > >
> > > >
> > > > On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
> > > >
> > > > > hi, folks,
> > > > >
> > > > > I am writing some code to get the zookeeper while hbase is offline.
> > > > >
> > > > >     conf = HBaseConfiguration.create();
> > > > >     ....
> > > > >     connection = HConnectionManager.getConnection(conf);
> > > > >     zkw = connection.*getZooKeeperWatcher();*
> > > > >     replicationZK = new ReplicationZookeeper(connection, conf,
> zkw);
> > > > >
> > > > > the goal is to create a new replicationZookeeper. Well, the above
> > code
> > > > > works, except connection.getZooKeeperWatcher() is deprecated in
> 0.94.
> > > > >
> > > > > Is there a way that I can complete the same logic without using the
> > > > > deprecated method? many thanks
> > > > >
> > > > > Demai
> > > > >
> > > >
> > >
> >
>

Re: how to get ZooKeeperWatcher info ?

Posted by Ted Yu <yu...@gmail.com>.
By filing a JIRA :-)


On Fri, Aug 16, 2013 at 10:52 AM, Demai Ni <ni...@gmail.com> wrote:

> Ted, thanks. I will need to find away around it. :-) ... demai
>
>
> On Fri, Aug 16, 2013 at 10:38 AM, Ted Yu <yu...@gmail.com> wrote:
>
> > Actually getKeepAliveZooKeeperWatcher() is currently package private.
> >
> > FYI
> >
> >
> > On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni <ni...@gmail.com> wrote:
> >
> > > hi, Ted,
> > >
> > > thanks. sorry that I didn't say it clearly. I am using 0.94.9 branch,
> > where
> > > the method is marked as 'Deprecated in HBase 0.94'
> > >
> > > Since getKeepAliveZooKeeperWatcher() is only in 0.95, I guess I will
> use
> > > the HConnection.getZooKeeperWatcher()for now, and move the
> > > getKeepAliveZooKeeperWatcher for later release.
> > >
> > > Appreciate the help.
> > >
> > > Demai
> > >
> > >
> > >
> > > On Fri, Aug 16, 2013 at 10:07 AM, Ted Yu <yu...@gmail.com> wrote:
> > >
> > > > In 0.94, I don't see deprecation information for
> getZooKeeperWatcher()
> > > >
> > > > In 0.95, I found:
> > > >      * Retrieve a shared ZooKeeperWatcher. You must close it it once
> > > you've
> > > > have finished with it.
> > > >      * @return The shared instance. Never returns null.
> > > >      */
> > > >     ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
> > > >
> > > >
> > > > On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
> > > >
> > > > > hi, folks,
> > > > >
> > > > > I am writing some code to get the zookeeper while hbase is offline.
> > > > >
> > > > >     conf = HBaseConfiguration.create();
> > > > >     ....
> > > > >     connection = HConnectionManager.getConnection(conf);
> > > > >     zkw = connection.*getZooKeeperWatcher();*
> > > > >     replicationZK = new ReplicationZookeeper(connection, conf,
> zkw);
> > > > >
> > > > > the goal is to create a new replicationZookeeper. Well, the above
> > code
> > > > > works, except connection.getZooKeeperWatcher() is deprecated in
> 0.94.
> > > > >
> > > > > Is there a way that I can complete the same logic without using the
> > > > > deprecated method? many thanks
> > > > >
> > > > > Demai
> > > > >
> > > >
> > >
> >
>

Re: how to get ZooKeeperWatcher info ?

Posted by Demai Ni <ni...@gmail.com>.
Ted, thanks. I will need to find away around it. :-) ... demai


On Fri, Aug 16, 2013 at 10:38 AM, Ted Yu <yu...@gmail.com> wrote:

> Actually getKeepAliveZooKeeperWatcher() is currently package private.
>
> FYI
>
>
> On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni <ni...@gmail.com> wrote:
>
> > hi, Ted,
> >
> > thanks. sorry that I didn't say it clearly. I am using 0.94.9 branch,
> where
> > the method is marked as 'Deprecated in HBase 0.94'
> >
> > Since getKeepAliveZooKeeperWatcher() is only in 0.95, I guess I will use
> > the HConnection.getZooKeeperWatcher()for now, and move the
> > getKeepAliveZooKeeperWatcher for later release.
> >
> > Appreciate the help.
> >
> > Demai
> >
> >
> >
> > On Fri, Aug 16, 2013 at 10:07 AM, Ted Yu <yu...@gmail.com> wrote:
> >
> > > In 0.94, I don't see deprecation information for getZooKeeperWatcher()
> > >
> > > In 0.95, I found:
> > >      * Retrieve a shared ZooKeeperWatcher. You must close it it once
> > you've
> > > have finished with it.
> > >      * @return The shared instance. Never returns null.
> > >      */
> > >     ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
> > >
> > >
> > > On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
> > >
> > > > hi, folks,
> > > >
> > > > I am writing some code to get the zookeeper while hbase is offline.
> > > >
> > > >     conf = HBaseConfiguration.create();
> > > >     ....
> > > >     connection = HConnectionManager.getConnection(conf);
> > > >     zkw = connection.*getZooKeeperWatcher();*
> > > >     replicationZK = new ReplicationZookeeper(connection, conf, zkw);
> > > >
> > > > the goal is to create a new replicationZookeeper. Well, the above
> code
> > > > works, except connection.getZooKeeperWatcher() is deprecated in 0.94.
> > > >
> > > > Is there a way that I can complete the same logic without using the
> > > > deprecated method? many thanks
> > > >
> > > > Demai
> > > >
> > >
> >
>

Re: how to get ZooKeeperWatcher info ?

Posted by Ted Yu <yu...@gmail.com>.
Actually getKeepAliveZooKeeperWatcher() is currently package private.

FYI


On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni <ni...@gmail.com> wrote:

> hi, Ted,
>
> thanks. sorry that I didn't say it clearly. I am using 0.94.9 branch, where
> the method is marked as 'Deprecated in HBase 0.94'
>
> Since getKeepAliveZooKeeperWatcher() is only in 0.95, I guess I will use
> the HConnection.getZooKeeperWatcher()for now, and move the
> getKeepAliveZooKeeperWatcher for later release.
>
> Appreciate the help.
>
> Demai
>
>
>
> On Fri, Aug 16, 2013 at 10:07 AM, Ted Yu <yu...@gmail.com> wrote:
>
> > In 0.94, I don't see deprecation information for getZooKeeperWatcher()
> >
> > In 0.95, I found:
> >      * Retrieve a shared ZooKeeperWatcher. You must close it it once
> you've
> > have finished with it.
> >      * @return The shared instance. Never returns null.
> >      */
> >     ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
> >
> >
> > On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
> >
> > > hi, folks,
> > >
> > > I am writing some code to get the zookeeper while hbase is offline.
> > >
> > >     conf = HBaseConfiguration.create();
> > >     ....
> > >     connection = HConnectionManager.getConnection(conf);
> > >     zkw = connection.*getZooKeeperWatcher();*
> > >     replicationZK = new ReplicationZookeeper(connection, conf, zkw);
> > >
> > > the goal is to create a new replicationZookeeper. Well, the above code
> > > works, except connection.getZooKeeperWatcher() is deprecated in 0.94.
> > >
> > > Is there a way that I can complete the same logic without using the
> > > deprecated method? many thanks
> > >
> > > Demai
> > >
> >
>

Re: how to get ZooKeeperWatcher info ?

Posted by Demai Ni <ni...@gmail.com>.
hi, Ted,

thanks. sorry that I didn't say it clearly. I am using 0.94.9 branch, where
the method is marked as 'Deprecated in HBase 0.94'

Since getKeepAliveZooKeeperWatcher() is only in 0.95, I guess I will use
the HConnection.getZooKeeperWatcher()for now, and move the
getKeepAliveZooKeeperWatcher for later release.

Appreciate the help.

Demai



On Fri, Aug 16, 2013 at 10:07 AM, Ted Yu <yu...@gmail.com> wrote:

> In 0.94, I don't see deprecation information for getZooKeeperWatcher()
>
> In 0.95, I found:
>      * Retrieve a shared ZooKeeperWatcher. You must close it it once you've
> have finished with it.
>      * @return The shared instance. Never returns null.
>      */
>     ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()
>
>
> On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
>
> > hi, folks,
> >
> > I am writing some code to get the zookeeper while hbase is offline.
> >
> >     conf = HBaseConfiguration.create();
> >     ....
> >     connection = HConnectionManager.getConnection(conf);
> >     zkw = connection.*getZooKeeperWatcher();*
> >     replicationZK = new ReplicationZookeeper(connection, conf, zkw);
> >
> > the goal is to create a new replicationZookeeper. Well, the above code
> > works, except connection.getZooKeeperWatcher() is deprecated in 0.94.
> >
> > Is there a way that I can complete the same logic without using the
> > deprecated method? many thanks
> >
> > Demai
> >
>

Re: how to get ZooKeeperWatcher info ?

Posted by Ted Yu <yu...@gmail.com>.
In 0.94, I don't see deprecation information for getZooKeeperWatcher()

In 0.95, I found:
     * Retrieve a shared ZooKeeperWatcher. You must close it it once you've
have finished with it.
     * @return The shared instance. Never returns null.
     */
    ZooKeeperKeepAliveConnection getKeepAliveZooKeeperWatcher()


On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:

> hi, folks,
>
> I am writing some code to get the zookeeper while hbase is offline.
>
>     conf = HBaseConfiguration.create();
>     ....
>     connection = HConnectionManager.getConnection(conf);
>     zkw = connection.*getZooKeeperWatcher();*
>     replicationZK = new ReplicationZookeeper(connection, conf, zkw);
>
> the goal is to create a new replicationZookeeper. Well, the above code
> works, except connection.getZooKeeperWatcher() is deprecated in 0.94.
>
> Is there a way that I can complete the same logic without using the
> deprecated method? many thanks
>
> Demai
>

Re: how to get ZooKeeperWatcher info ?

Posted by Demai Ni <ni...@gmail.com>.
yeah. the tool will be applied when hbase on master cluster is down. In the
case that user decides not to restart hbase(for whatever reason), the tool
will be used to push the pending Edits over to slave peers.

I will look into RecoverableZooKeeper. thanks for the suggestion

Demai


On Mon, Aug 19, 2013 at 11:09 AM, Stack <st...@duboce.net> wrote:

> On Sun, Aug 18, 2013 at 11:37 AM, Demai Ni <ni...@gmail.com> wrote:
>
> > St.Ack and Ted,
> >
> > many thanks for your help and suggestions on this question. I am working
> > HBASE-9047 while encountering this question. To provide a whole picture
> of
> > what I am looking for, I uploaded the prototype code and some background
> > info over there(
> > https://issues.apache.org/jira/browse/HBASE-9047#comment-13743322).
> > Basically, I am looking for a way to get the original zookeeper when
> hbase
> > is offline, so that a new replicationManager can be created and
> consolidate
> > the pending replication Edits, once get them, the replicationManger will
> do
> > its magic using the logic as if hbase is restarting. will
> > RecoverableZooKeeper instance have the access to the replication info
> from
> > original zookeeper?
> >
>
> hbase is down at this time?
>
> The replication state is kept out in zk so yeah, any connection to zk will
> have a view on current state of replication.
>
> St.Ack
>

Re: how to get ZooKeeperWatcher info ?

Posted by Stack <st...@duboce.net>.
On Sun, Aug 18, 2013 at 11:37 AM, Demai Ni <ni...@gmail.com> wrote:

> St.Ack and Ted,
>
> many thanks for your help and suggestions on this question. I am working
> HBASE-9047 while encountering this question. To provide a whole picture of
> what I am looking for, I uploaded the prototype code and some background
> info over there(
> https://issues.apache.org/jira/browse/HBASE-9047#comment-13743322).
> Basically, I am looking for a way to get the original zookeeper when hbase
> is offline, so that a new replicationManager can be created and consolidate
> the pending replication Edits, once get them, the replicationManger will do
> its magic using the logic as if hbase is restarting. will
> RecoverableZooKeeper instance have the access to the replication info from
> original zookeeper?
>

hbase is down at this time?

The replication state is kept out in zk so yeah, any connection to zk will
have a view on current state of replication.

St.Ack

Re: how to get ZooKeeperWatcher info ?

Posted by Demai Ni <ni...@gmail.com>.
St.Ack and Ted,

many thanks for your help and suggestions on this question. I am working
HBASE-9047 while encountering this question. To provide a whole picture of
what I am looking for, I uploaded the prototype code and some background
info over there(
https://issues.apache.org/jira/browse/HBASE-9047#comment-13743322).
Basically, I am looking for a way to get the original zookeeper when hbase
is offline, so that a new replicationManager can be created and consolidate
the pending replication Edits, once get them, the replicationManger will do
its magic using the logic as if hbase is restarting. will
RecoverableZooKeeper instance have the access to the replication info from
original zookeeper?

Demai


On Sun, Aug 18, 2013 at 9:35 AM, Stack <st...@duboce.net> wrote:

> On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:
>
> > hi, folks,
> >
> > I am writing some code to get the zookeeper while hbase is offline.
> >
> >     conf = HBaseConfiguration.create();
> >     ....
> >     connection = HConnectionManager.getConnection(conf);
> >     zkw = connection.*getZooKeeperWatcher();*
> >     replicationZK = new ReplicationZookeeper(connection, conf, zkw);
> >
> > the goal is to create a new replicationZookeeper. Well, the above code
> > works, except connection.getZooKeeperWatcher() is deprecated in 0.94.
> >
> > Is there a way that I can complete the same logic without using the
> > deprecated method? many thanks
> >
>
>
> HBASE-8439 removes ReplicationZooKeeper from trunk/0.96.
>
> HBASE-1762 removes being able to get zookeeper from HConnection (zk is an
> implementation detail that should not come through the HConnection
> Interface).
>
> Create your own RecoverableZooKeeper instance?
> St.Ack
>

Re: how to get ZooKeeperWatcher info ?

Posted by Stack <st...@duboce.net>.
On Fri, Aug 16, 2013 at 9:58 AM, Demai Ni <ni...@gmail.com> wrote:

> hi, folks,
>
> I am writing some code to get the zookeeper while hbase is offline.
>
>     conf = HBaseConfiguration.create();
>     ....
>     connection = HConnectionManager.getConnection(conf);
>     zkw = connection.*getZooKeeperWatcher();*
>     replicationZK = new ReplicationZookeeper(connection, conf, zkw);
>
> the goal is to create a new replicationZookeeper. Well, the above code
> works, except connection.getZooKeeperWatcher() is deprecated in 0.94.
>
> Is there a way that I can complete the same logic without using the
> deprecated method? many thanks
>


HBASE-8439 removes ReplicationZooKeeper from trunk/0.96.

HBASE-1762 removes being able to get zookeeper from HConnection (zk is an
implementation detail that should not come through the HConnection
Interface).

Create your own RecoverableZooKeeper instance?
St.Ack