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

        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
        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.
        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
        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.

          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