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

Nicolas Liochon commented on HBASE-9333:
----------------------------------------

hbase.client.max.total.tasks could be lowered to something like 50, no? We 
could as well configure it dynamically: something like twice the number of 
region servers, caped to 200 could be enough.

If we add a queue, we could use the queue size to refuse or not the new 
operations (adding something like:
{code}
  protected boolean canTakeNewOperations(String encodedRegionName) {
    if (workQueue.size() > 100) return false; // thread pool is already 
overloaded
    AtomicInteger ct = taskCounterPerRegion.get(encodedRegionName);
    return ct == null || ct.get() < maxConcurrentTasksPerRegion;
  }
{code}

This test scenario is with puts only, on different HTable, yes? For gets, we 
don't control anything today, we just add tasks, but the number of threads per 
AsyncProcess should be equals to the number of region server.

While looking at this, I found a bug (HBASE-9609) but it should have a limited 
impact here.
                
> hbase.hconnection.threads.max should not be configurable else you get 
> RejectedExecutionException
> ------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-9333
>                 URL: https://issues.apache.org/jira/browse/HBASE-9333
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.95.2
>            Reporter: Jean-Daniel Cryans
>            Assignee: Elliott Clark
>            Priority: Critical
>             Fix For: 0.98.0, 0.96.0
>
>         Attachments: HBASE-9333-0.patch, HBASE-9333-1.patch, 
> HBASE-9333-2.patch
>
>
> Trying to set hbase.hconnection.threads.max to a lower number than its 
> default of Integer.MAX_VALUE simply results in a RejectedExecutionException 
> when the max is reached. It seems there's no good reason to keep this 
> configurable.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to