[
https://issues.apache.org/jira/browse/HBASE-21764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16755141#comment-16755141
]
Zheng Hu commented on HBASE-21764:
----------------------------------
Thanks the +1 for [~stack]. And see the [~Apache9]'s comment in RB, it's
also seem not good to move the IN_MEMORY_COMPACTION_POOL into RS to be an
normal member, because the RS should only see the abstract memstore (did not
know it's default memstore or IMC memstore.), so we should not expose the IMC
pool in RS layer.
While the config is an no-static member in RS, inializing an IMC pool by using
an non-static config is not so elegance. but seems no better way.
> Size of in-memory compaction thread pool shoud be configurable
> --------------------------------------------------------------
>
> Key: HBASE-21764
> URL: https://issues.apache.org/jira/browse/HBASE-21764
> Project: HBase
> Issue Type: Sub-task
> Components: in-memory-compaction
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Fix For: 3.0.0, 2.2.0, 2.1.3, 2.0.5
>
> Attachments: HBASE-21764.v1.patch, HBASE-21764.v2.patch,
> HBASE-21764.v3.patch
>
>
> In RegionServicesForStores, we can see :
> {code}
> private static final int POOL_SIZE = 10;
> private static final ThreadPoolExecutor INMEMORY_COMPACTION_POOL =
> new ThreadPoolExecutor(POOL_SIZE, POOL_SIZE, 60, TimeUnit.SECONDS,
> new LinkedBlockingQueue<>(),
> new ThreadFactory() {
> @Override
> public Thread newThread(Runnable r) {
> String name = Thread.currentThread().getName() +
> "-inmemoryCompactions-" +
> System.currentTimeMillis();
> return new Thread(r, name);
> }
> });
> {code}
> The pool size should be configurable, because if many regions on a rs, the
> default 10 threads will be not enough.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)