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

Reid Chan commented on HBASE-20095:
-----------------------------------

Only one updates the static pool. Because {{ConfigurationObserver}} is called 
sequentially, let's say {{LogCleaner}} is called first, then size of pool 
{{updatedSize}} is updated, following {{HFileCleaner}} which should see the 
latest {{updatedSize}} and should not reconfigure the pool and just return. The 
snippet,
{code}
public void onConfigurationChange(Configuration conf) {
    int updatedSize = calculatePoolSize(conf.get(CHORE_POOL_SIZE, 
DEFAULT_CHORE_POOL_SIZE));
    if (updatedSize == poolSize) {
      LOG.trace("Size from configuration is same as previous={}, no need to 
update.", updatedSize);
      return;
    }
    poolSize = updatedSize;
    ...
}
{code}

> Redesign single instance pool in CleanerChore
> ---------------------------------------------
>
>                 Key: HBASE-20095
>                 URL: https://issues.apache.org/jira/browse/HBASE-20095
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Reid Chan
>            Assignee: Reid Chan
>            Priority: Critical
>         Attachments: HBASE-20095.master.001.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to