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

rolling-restart.sh script hangs when attempting to detect expiration of /hbase/master znode.

    Details

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

      Description

      Due to bugfix ZOOKEEPER-1059 (ZK 3.4.0+), the rolling-restart.sh script will hang when attempting to make sure the /hbase/master znode is deleted.

      Here's the code

      # make sure the master znode has been deleted before continuing
          zparent=`$bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool zookeeper.znode.parent`
          if [ "$zparent" == "null" ]; then zparent="/hbase"; fi
          zmaster=`$bin/hbase org.apache.hadoop.hbase.util.HBaseConfTool zookeeper.znode.master`
          if [ "$zmaster" == "null" ]; then zmaster="master"; fi
          zmaster=$zparent/$zmaster
          echo -n "Waiting for Master ZNode ${zmaster} to expire"
          while bin/hbase zkcli stat $zmaster >/dev/null 2>&1; do
            echo -n "."
            sleep 1
          done
          echo #force a newline
      

      Prior to ZOOKEEPER-1059, stat on a null znode would NPE and cause zkcli to exit with retcode 1. Afterwards, the null is caught, zkcli will exit with 0 in the case where the znode is present and in the case where it does not exist.

        Attachments

        1. HBASE-5603.patch
          0.5 kB
          Jonathan Hsieh

          Issue Links

            Activity

              People

              • Assignee:
                jmhsieh Jonathan Hsieh
                Reporter:
                jmhsieh Jonathan Hsieh
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: