[
https://issues.apache.org/jira/browse/HBASE-3767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019684#comment-13019684
]
Ted Yu commented on HBASE-3767:
-------------------------------
The javadoc fragment doesn't mention allowCoreThreadTimeOut.
>From
>http://fuseyism.com/classpath/doc/java/util/concurrent/ThreadPoolExecutor-source.html:
{code:Java}
494: Runnable getTask() {
495: for (;;) {
496: try {
497: switch (runState) {
498: case RUNNING: {
499: // untimed wait if core and not allowing core timeout
500: if (poolSize <= corePoolSize &&
!allowCoreThreadTimeOut)
501: return workQueue.take();
502:
503: long timeout = keepAliveTime;
504: if (timeout <= 0) // die immediately for 0 timeout
505: return null;
506: Runnable r = workQueue.poll(timeout,
TimeUnit.NANOSECONDS);
507: if (r != null)
508: return r;
509: if (poolSize > corePoolSize || allowCoreThreadTimeOut)
510: return null; // timed out
511: // Else, after timeout, the pool shrank. Retry
512: break;
513: }
{code:Java}
In HTable(), allowCoreThreadTimeOut is set to true. So we're not bounded by
corePoolSize threads.
> Cache the number of RS in HTable
> --------------------------------
>
> Key: HBASE-3767
> URL: https://issues.apache.org/jira/browse/HBASE-3767
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 0.90.2
> Reporter: Jean-Daniel Cryans
> Fix For: 0.90.3
>
> Attachments: HBASE-3767.patch
>
>
> When creating a new HTable we have to query ZK to learn about the number of
> region servers in the cluster. That is done for every single one of them, I
> think instead we should do it once per JVM and then reuse that number for all
> the others.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira