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

        gaojinchao created issue -
        xufeng made changes -
        Field Original Value New Value
        Attachment 4773.patch [ 12503576 ]
        xufeng made changes -
        Attachment branches_4773.patch [ 12505295 ]
        Attachment trunk_4773_patch.patch [ 12505296 ]
        Ted Yu made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Ted Yu made changes -
        Summary HBaseAdmin leaks ZooKeeper connections HBaseAdmin may leak ZooKeeper connections
        Ted Yu made changes -
        Assignee xufeng [ xufeng ]
        stack made changes -
        Fix Version/s 0.90.6 [ 12319200 ]
        Fix Version/s 0.90.5 [ 12317145 ]
        ramkrishna.s.vasudevan made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.92.0 [ 12314223 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development