Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # dev - how to get ZooKeeperWatcher info ?


Copy link to this message
-
Re: how to get ZooKeeperWatcher info ?
Ted Yu 2013-08-18, 03:20
I have logged HBASE-9258 for this.

Cheers
On Fri, Aug 16, 2013 at 8:09 PM, Demai Ni <[EMAIL PROTECTED]> wrote:

> Ted, definitely +1 from me. Many thanks
>
> Demai on the run
>
> On Aug 16, 2013, at 6:35 PM, Ted Yu <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
> >
> >> Ted, thanks. I will need to find away around it. :-) ... demai
> >>
> >>
> >> On Fri, Aug 16, 2013 at 10:38 AM, Ted Yu <[EMAIL PROTECTED]> wrote:
> >>
> >>> Actually getKeepAliveZooKeeperWatcher() is currently package private.
> >>>
> >>> FYI
> >>>
> >>>
> >>> On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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
> >>
>