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

Failed MiniZooKeeperCluster startup did not shutdown ZK servers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0, 1.2.0, 2.0.0
    • 1.2.0, 1.1.1, 2.0.0
    • Zookeeper
    • None
    • Reviewed

    Description

      MiniZooKeeperCluster#startup() starts servers one-by-one, if everything is good, it would declare success of start:

        public int startup(File baseDir, int numZooKeeperServers) 
          ...
          // running all the ZK servers
          for (int i = 0; i < numZooKeeperServers; i++) {
          ...===> could throw exception in the loop and end the startup
            // Start up this ZK server
            standaloneServerFactory.startup(server);
            ...
            standaloneServerFactoryList.add(standaloneServerFactory);
            zooKeeperServers.add(server);
          }
         ...
          started = true;
          ...
        }
      
      

      However, if exception throws in the middle of start up (eg. some servers already started), the MiniZooKeeperCluster#shutdown() would not shut down them and clean up resources.

        public void shutdown() throws IOException {
          if (!started) {
            return;
          }
          ...
        }
      

      Attachments

        1. HBASE-13733.v1.patch
          2 kB
          Stephen Yuan Jiang

        Activity

          People

            syuanjiang Stephen Yuan Jiang
            syuanjiang Stephen Yuan Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: