Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E96410556 for ; Sun, 18 Aug 2013 03:21:14 +0000 (UTC) Received: (qmail 72311 invoked by uid 500); 18 Aug 2013 03:21:11 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 72264 invoked by uid 500); 18 Aug 2013 03:21:09 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 72250 invoked by uid 99); 18 Aug 2013 03:21:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Aug 2013 03:21:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuzhihong@gmail.com designates 209.85.217.179 as permitted sender) Received: from [209.85.217.179] (HELO mail-lb0-f179.google.com) (209.85.217.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Aug 2013 03:21:03 +0000 Received: by mail-lb0-f179.google.com with SMTP id v1so2220872lbd.38 for ; Sat, 17 Aug 2013 20:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3mix3QDvbCWGKt9YxVmqxVbgSx3uy8YbnlAJ/Dg+CPA=; b=yEULv4whHN8OFUGDdpQnYTImDo0F5dCLj0lLQJjZiRY2mqUw+FAZaUUgx5v2kaIdgb kC5EHnH0U64jo+flojx5utIPbTo96oLF+O25p+85C6IIpgvdfJk7zVpUg/N1GOAdRaTL i5RwOsHcE4u7DdEJP88DkCPn/Uy82F7G9Or2z1tr5OIJce4/QO7rlW8PTRryFq1Nl8Cp e7NfeJvoABEkDGJsRzUeQiU4mtipiVacYEL2FpcAxeKfqtw6oNV5SHelR62c2WGLaa8y FAfF5/rFnk8nV6S+u2wpgdFS5r3aLH/DVXv4BvA2GecIyUabMhRHN45GQXkjusrnJUSt WvBQ== MIME-Version: 1.0 X-Received: by 10.112.33.68 with SMTP id p4mr5217719lbi.13.1376796041294; Sat, 17 Aug 2013 20:20:41 -0700 (PDT) Received: by 10.112.129.40 with HTTP; Sat, 17 Aug 2013 20:20:41 -0700 (PDT) In-Reply-To: References: Date: Sat, 17 Aug 2013 20:20:41 -0700 Message-ID: Subject: Re: how to get ZooKeeperWatcher info ? From: Ted Yu To: "dev@hbase.apache.org" Content-Type: multipart/alternative; boundary=14dae93d8f82f8398a04e4304e40 X-Virus-Checked: Checked by ClamAV on apache.org --14dae93d8f82f8398a04e4304e40 Content-Type: text/plain; charset=ISO-8859-1 I have logged HBASE-9258 for this. Cheers On Fri, Aug 16, 2013 at 8:09 PM, Demai Ni wrote: > Ted, definitely +1 from me. Many thanks > > Demai on the run > > On Aug 16, 2013, at 6:35 PM, Ted Yu 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 wrote: > > > >> Ted, thanks. I will need to find away around it. :-) ... demai > >> > >> > >> On Fri, Aug 16, 2013 at 10:38 AM, Ted Yu wrote: > >> > >>> Actually getKeepAliveZooKeeperWatcher() is currently package private. > >>> > >>> FYI > >>> > >>> > >>> On Fri, Aug 16, 2013 at 10:32 AM, Demai Ni 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 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 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 > >> > --14dae93d8f82f8398a04e4304e40--