Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-5722

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.94.0, 0.95.2
    • 0.94.1, 0.95.0
    • Zookeeper
    • None
    • 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.

      Attachments

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

        Activity

          People

            umamaheswararao Uma Maheswara Rao G
            umamaheswararao Uma Maheswara Rao G
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: