HBase
  1. HBase
  2. HBASE-4773

HBaseAdmin may leak ZooKeeper connections

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.90.4
    • Fix Version/s: 0.90.6, 0.92.0
    • Component/s: Client
    • Labels:
      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; }

      }

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

        Activity

          People

          • Assignee:
            xufeng
            Reporter:
            gaojinchao
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development