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

HBaseAdmin may leak ZooKeeper connections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.90.4
    • 0.90.6, 0.92.0
    • Client
    • None

    Description

      When master crashs, HBaseAdmin will leaks ZooKeeper connections
      I think we should close the zk connetion when throw MasterNotRunningException

      public HBaseAdmin(Configuration c)
      throws MasterNotRunningException, ZooKeeperConnectionException {
      this.conf = HBaseConfiguration.create(c);
      this.connection = HConnectionManager.getConnection(this.conf);
      this.pause = this.conf.getLong("hbase.client.pause", 1000);
      this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
      this.retryLongerMultiplier = this.conf.getInt("hbase.client.retries.longer.multiplier", 10);

      //we should add this code and close the zk connection
      try

      { this.connection.getMaster(); }

      catch(MasterNotRunningException e)

      { HConnectionManager.deleteConnection(conf, false); throw e; }

      }

      Attachments

        1. trunk_4773_patch.patch
          0.9 kB
          xufeng
        2. branches_4773.patch
          2 kB
          xufeng
        3. 4773.patch
          0.8 kB
          xufeng

        Activity

          People

            xufeng xufeng
            sunnygao gaojinchao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: