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 4DC4A10283 for ; Fri, 16 Aug 2013 17:54:14 +0000 (UTC) Received: (qmail 89888 invoked by uid 500); 16 Aug 2013 17:54:12 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 89839 invoked by uid 500); 16 Aug 2013 17:54:12 -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 89831 invoked by uid 99); 16 Aug 2013 17:54:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 17:54:12 +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.169 as permitted sender) Received: from [209.85.217.169] (HELO mail-lb0-f169.google.com) (209.85.217.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 17:54:07 +0000 Received: by mail-lb0-f169.google.com with SMTP id u10so1621365lbi.14 for ; Fri, 16 Aug 2013 10:53:45 -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=UjRO8iJvUI/pPiplOxN0O+cQfQzS25hAx1iLUAZxAM0=; b=X0JiqZaXh9G3KBW/uxm3GeoGSAAzxKBpWVC9c95ckHQ9sf+7s0GSKDAuHjj9Ils7cV VPn06seuHqU3hFwkxc8fB/uz/MbWbzxDWZoZIg5oTxodPqLGi22vXt45JAVDoM72uhZf F86gVC2i1exU7IouwSITX9D8Xcp2XpMYcQgWnaImpAg04yIhBfghjBrgjkkfz0imA6AV QDvOLGAo19sV4duJUayPgmJHHJUPQZBapafB35vqxDg8bxySDcOXbJfWQm2X24JpEkVY cIrPRTxrCLOqbas5OtUVwDbPFxh2E9lB846SHzpOByxGtdNijQPHJx2i4FCYz0WV8tN7 Wtiw== MIME-Version: 1.0 X-Received: by 10.112.24.2 with SMTP id q2mr2640408lbf.34.1376675625639; Fri, 16 Aug 2013 10:53:45 -0700 (PDT) Received: by 10.112.129.40 with HTTP; Fri, 16 Aug 2013 10:53:45 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Aug 2013 10:53:45 -0700 Message-ID: Subject: Re: how to get ZooKeeperWatcher info ? From: Ted Yu To: "dev@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a11343514a3303304e414455a X-Virus-Checked: Checked by ClamAV on apache.org --001a11343514a3303304e414455a Content-Type: text/plain; charset=ISO-8859-1 By filing a JIRA :-) 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 > > > > > > > > > > > > > > > --001a11343514a3303304e414455a--