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 A8CA9100B2 for ; Fri, 16 Aug 2013 17:07:30 +0000 (UTC) Received: (qmail 60905 invoked by uid 500); 16 Aug 2013 17:07:29 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 60848 invoked by uid 500); 16 Aug 2013 17:07:29 -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 60836 invoked by uid 99); 16 Aug 2013 17:07:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 17:07:28 +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 (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.215.44 as permitted sender) Received: from [209.85.215.44] (HELO mail-la0-f44.google.com) (209.85.215.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 17:07:22 +0000 Received: by mail-la0-f44.google.com with SMTP id eo20so1726329lab.3 for ; Fri, 16 Aug 2013 10:07:01 -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=F5to5sstlRkqa+pOEe/oIpNM0b2nwUjLTLc6p7zbAQo=; b=hWMKZyTfe5sUWCnF2Kyp6MuwbWLDLbHDux0ZswCYn+0FP2/JpavCtWOPlEsrQodw8P LX4gOeK9zyAlXs8v0ZxYWIWFew7WAou5omHNE57LOK+xy9mgZfAMCRfqXws8ynAfsPt1 rq07PPrEV2ND0WnhPFm/R9svDTeEbISD19P4jnq15yUkQhvMRcl5MCyfk2m0hg/bgGxg 21+2Ov6P9eHhEYU9XnilbkkZTfK1d0+hWEOqWsv7WuBl9pgX08NhPBmc6kst4+FIQIoD LRvRVy/lSc9qs2x10GjavsJrTyVxZWuFlkgQBLbyrbmY+LIqZ6pPDmfeeDbWfhn2X9HG rTwA== MIME-Version: 1.0 X-Received: by 10.112.35.225 with SMTP id l1mr2217340lbj.37.1376672821772; Fri, 16 Aug 2013 10:07:01 -0700 (PDT) Received: by 10.112.129.40 with HTTP; Fri, 16 Aug 2013 10:07:01 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Aug 2013 10:07:01 -0700 Message-ID: Subject: Re: how to get ZooKeeperWatcher info ? From: Ted Yu To: "dev@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a11c3694283875c04e4139e74 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3694283875c04e4139e74 Content-Type: text/plain; charset=ISO-8859-1 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 > --001a11c3694283875c04e4139e74--