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

HTable.close() should shut down executor pool

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.90.3
    • None
    • Client
    • None

    Description

      Right now, it looks like HTable.close() is primarily concerned with flushing commits. I understand the intended semantics of close to be that clients should not attempt to call any other methods on that HTable instance after close is called. If that's true, then close() might leave around some relatively heavy resources after close() is called that can serve no further purpose. In particular, the executor this.pool may have a number of threads outstanding for some period of time (a minute with the default keepAliveTime of 60). With the default number of threads == the number of regionservers and with each thread having a 1mb stack by default on 64-bit jvms, this can be a considerable amount of memory left around (in addition to any other resources consumed by each thread). Is there any reason for close() not to also call this.pool.shutdown() after it calls flushCommits()?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              joshrose Josh Rosenblum
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: