Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 869069119 for ; Wed, 30 May 2012 17:09:24 +0000 (UTC) Received: (qmail 9407 invoked by uid 500); 30 May 2012 17:09:23 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 9297 invoked by uid 500); 30 May 2012 17:09:23 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 9119 invoked by uid 99); 30 May 2012 17:09:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2012 17:09:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 9451F142857 for ; Wed, 30 May 2012 17:09:23 +0000 (UTC) Date: Wed, 30 May 2012 17:09:23 +0000 (UTC) From: "ramkrishna.s.vasudevan (JIRA)" To: issues@hbase.apache.org Message-ID: <224478251.17092.1338397763610.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1656015287.16349.1333618294779.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (HBASE-5722) NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-5722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ramkrishna.s.vasudevan resolved HBASE-5722. ------------------------------------------- Resolution: Fixed > NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. > ---------------------------------------------------------------------------------- > > Key: HBASE-5722 > URL: https://issues.apache.org/jira/browse/HBASE-5722 > Project: HBase > Issue Type: Bug > Components: zookeeper > Affects Versions: 0.94.0, 0.96.0 > Reporter: Uma Maheswara Rao G > Assignee: Uma Maheswara Rao G > Fix For: 0.96.0, 0.94.1 > > Attachments: HBASE-5722.patch > > > {code} > List nodes = > ZKUtil.listChildrenAndWatchForNewChildren(zkw, baseNode); > List newNodes = new ArrayList(); > for (String node: nodes) { > String nodePath = ZKUtil.joinZNode(baseNode, node); > byte [] data = ZKUtil.getDataAndWatch(zkw, nodePath); > newNodes.add(new NodeAndData(nodePath, data)); > } > {code} > The above code can throw NPE when listChildrenAndWatchForNewChildren returns null. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira