hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17174) Use shared threadpool in BufferedMutatorImpl
Date Thu, 24 Nov 2016 17:33:59 GMT

    [ https://issues.apache.org/jira/browse/HBASE-17174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15693866#comment-15693866
] 

Anoop Sam John commented on HBASE-17174:
----------------------------------------

So BufferedMutator can be created using Connection#getBufferedMutator(BufferedMutatorParams
params) and in BufferedMutatorParams one can pass own ThreadPool.  When this way it is been
passed, that should not be closed within the Mutator as it is not owning pool.
How abt doing it this way?
if (params.getPool() == null) {
      params.pool(HTable.getDefaultExecutor(getConfiguration()));
    }
Remove the above piece of code and call BufferedMutatorImpl constructor.  Within the constructor
if pool is null, get the default executor. Ya u will need a boolean within BufferedMutatorImpl
 for cleanupPoolOnClose which we can easily decide in BufferedMutatorImpl  constructor.  So
we can avoid the state and new methods in BufferedMutatorParams .

> Use shared threadpool in BufferedMutatorImpl
> --------------------------------------------
>
>                 Key: HBASE-17174
>                 URL: https://issues.apache.org/jira/browse/HBASE-17174
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 2.0.0
>            Reporter: ChiaPing Tsai
>            Assignee: ChiaPing Tsai
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17174.v0.patch, HBASE-17174.v1.patch
>
>
> A update-heavy application, for example, loader, creates many BufferedMutator for batch
updates. But these BufferedMutators can’t share a large threadpool because the shutdown()
method will be called when closing any BufferedMutator. This patch adds a flag into BufferedMutatorParams
for preventing calling the shutdown() method in BufferedMutatorImpl#close



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message