You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Josh Rosenblum (JIRA)" <ji...@apache.org> on 2011/09/23 20:22:26 UTC

[jira] [Created] (HBASE-4471) HTable.close() should shut down executor pool

HTable.close() should shut down executor pool
---------------------------------------------

                 Key: HBASE-4471
                 URL: https://issues.apache.org/jira/browse/HBASE-4471
             Project: HBase
          Issue Type: Bug
          Components: client
    Affects Versions: 0.90.3
            Reporter: Josh Rosenblum


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()?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-4471) HTable.close() should shut down executor pool

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-4471.
--------------------------

    Resolution: Duplicate

Resolving as duplicate of:

{code}
   HBASE-3712  HTable.close() doesn't shutdown thread pool
               (Ted Yu via Stack)
{code}

> HTable.close() should shut down executor pool
> ---------------------------------------------
>
>                 Key: HBASE-4471
>                 URL: https://issues.apache.org/jira/browse/HBASE-4471
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.3
>            Reporter: Josh Rosenblum
>
> 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()?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4471) HTable.close() should shut down executor pool

Posted by "Josh Rosenblum (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114390#comment-13114390 ] 

Josh Rosenblum commented on HBASE-4471:
---------------------------------------

Thanks for checking this out. I do see this corrected in 0.90.3. This is my mistake -- it looks like it was present in 0.90.1 and 0.90.2 but has been corrected in 0.90.3 (there is an additional call to this.pool.shutdown() added in HTable.close() there, it looks like)

> HTable.close() should shut down executor pool
> ---------------------------------------------
>
>                 Key: HBASE-4471
>                 URL: https://issues.apache.org/jira/browse/HBASE-4471
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.3
>            Reporter: Josh Rosenblum
>
> 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()?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4471) HTable.close() should shut down executor pool

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113765#comment-13113765 ] 

stack commented on HBASE-4471:
------------------------------

Not doing pool shutdown like a bug to me (If you look in 0.92, we seem to call pool shutdown -- where are you looking?)

> HTable.close() should shut down executor pool
> ---------------------------------------------
>
>                 Key: HBASE-4471
>                 URL: https://issues.apache.org/jira/browse/HBASE-4471
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.3
>            Reporter: Josh Rosenblum
>
> 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()?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira