HBase
  1. HBase
  2. HBASE-5722

NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.94.0, 0.95.2
    • Fix Version/s: 0.94.1, 0.95.0
    • Component/s: Zookeeper
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      List<String> nodes =
            ZKUtil.listChildrenAndWatchForNewChildren(zkw, baseNode);
          List<NodeAndData> newNodes = new ArrayList<NodeAndData>();
          for (String node: nodes) {
            String nodePath = ZKUtil.joinZNode(baseNode, node);
            byte [] data = ZKUtil.getDataAndWatch(zkw, nodePath);
            newNodes.add(new NodeAndData(nodePath, data));
          }
      

      The above code can throw NPE when listChildrenAndWatchForNewChildren returns null.

      1. HBASE-5722.patch
        3 kB
        Uma Maheswara Rao G

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        11h 55m 1 Uma Maheswara Rao G 05/Apr/12 22:27
        Patch Available Patch Available Resolved Resolved
        43m 55s 1 stack 05/Apr/12 23:11
        Resolved Resolved Reopened Reopened
        54d 12h 15m 1 ramkrishna.s.vasudevan 30/May/12 11:26
        Reopened Reopened Resolved Resolved
        6h 41m 1 ramkrishna.s.vasudevan 30/May/12 18:07
        Resolved Resolved Closed Closed
        134d 12h 28m 1 Lars Hofhansl 12/Oct/12 06:36
        Lars Hofhansl made changes -
        Fix Version/s 0.94.1 [ 12320257 ]
        Fix Version/s 0.94.0 [ 12316419 ]
        Lars Hofhansl made changes -
        Fix Version/s 0.94.0 [ 12316419 ]
        stack made changes -
        Fix Version/s 0.95.0 [ 12324094 ]
        Fix Version/s 0.96.0 [ 12320040 ]
        Fix Version/s 0.94.1 [ 12320257 ]
        Lars Hofhansl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94-security #33 (See https://builds.apache.org/job/HBase-0.94-security/33/)
        HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Uma) (Revision 1344351)

        Result = FAILURE
        ramkrishna :
        Files :

        • /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        Show
        Hudson added a comment - Integrated in HBase-0.94-security #33 (See https://builds.apache.org/job/HBase-0.94-security/33/ ) HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Uma) (Revision 1344351) Result = FAILURE ramkrishna : Files : /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94 #233 (See https://builds.apache.org/job/HBase-0.94/233/)
        HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Uma) (Revision 1344351)

        Result = FAILURE
        ramkrishna :
        Files :

        • /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        Show
        Hudson added a comment - Integrated in HBase-0.94 #233 (See https://builds.apache.org/job/HBase-0.94/233/ ) HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Uma) (Revision 1344351) Result = FAILURE ramkrishna : Files : /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        ramkrishna.s.vasudevan made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        ramkrishna.s.vasudevan added a comment -

        The comment above mentioned that the commit was done to 0.94, but it wasn't. I have committed it to 0.94. Just a mere copy paste. ensured that the test case passes.

        Show
        ramkrishna.s.vasudevan added a comment - The comment above mentioned that the commit was done to 0.94, but it wasn't. I have committed it to 0.94. Just a mere copy paste. ensured that the test case passes.
        ramkrishna.s.vasudevan made changes -
        Fix Version/s 0.96.0 [ 12320040 ]
        Fix Version/s 0.94.1 [ 12320257 ]
        Fix Version/s 0.94.0 [ 12316419 ]
        Affects Version/s 0.94.0 [ 12316419 ]
        ramkrishna.s.vasudevan made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        ramkrishna.s.vasudevan added a comment -

        This got committed to 0.96 only and not to 0.94. Hence reopening so that once committed we can close it.

        Show
        ramkrishna.s.vasudevan added a comment - This got committed to 0.96 only and not to 0.94. Hence reopening so that once committed we can close it.
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #159 (See https://builds.apache.org/job/HBase-TRUNK-security/159/)
        HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Revision 1310104)

        Result = FAILURE
        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
        • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #159 (See https://builds.apache.org/job/HBase-TRUNK-security/159/ ) HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Revision 1310104) Result = FAILURE stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2716 (See https://builds.apache.org/job/HBase-TRUNK/2716/)
        HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Revision 1310104)

        Result = SUCCESS
        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
        • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2716 (See https://builds.apache.org/job/HBase-TRUNK/2716/ ) HBASE-5722 NPE in ZKUtil#getChildDataAndWatchForNewChildren when ZK not available or NW down. (Revision 1310104) Result = SUCCESS stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
        stack made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 0.94.0 [ 12316419 ]
        Resolution Fixed [ 1 ]
        Hide
        stack added a comment -

        Committed to 0.94 and trunk.

        Show
        stack added a comment - Committed to 0.94 and trunk.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12521579/HBASE-5722.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 2 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.coprocessor.TestRowProcessorEndpoint

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1414//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1414//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1414//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12521579/HBASE-5722.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 2 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.coprocessor.TestRowProcessorEndpoint Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1414//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1414//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1414//console This message is automatically generated.
        Hide
        stack added a comment -

        +1 on patch. Will wait on hadoopqa.

        Show
        stack added a comment - +1 on patch. Will wait on hadoopqa.
        Uma Maheswara Rao G made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Uma Maheswara Rao G made changes -
        Field Original Value New Value
        Attachment HBASE-5722.patch [ 12521579 ]
        Uma Maheswara Rao G created issue -

          People

          • Assignee:
            Uma Maheswara Rao G
            Reporter:
            Uma Maheswara Rao G
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development