HBASE-27565 Make the initial corePoolSize configurable for ChoreService (#4958)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
c1b9d8ba06
commit
dff8e50849
|
@ -59,6 +59,12 @@ public class ChoreService {
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public final static int MIN_CORE_POOL_SIZE = 1;
|
public final static int MIN_CORE_POOL_SIZE = 1;
|
||||||
|
/**
|
||||||
|
* The initial number of threads in the core pool for the {@link ChoreService}.
|
||||||
|
*/
|
||||||
|
public static final String CHORE_SERVICE_INITIAL_POOL_SIZE =
|
||||||
|
"hbase.choreservice.initial.pool.size";
|
||||||
|
public static final int DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This thread pool is used to schedule all of the Chores
|
* This thread pool is used to schedule all of the Chores
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase;
|
package org.apache.hadoop.hbase;
|
||||||
|
|
||||||
|
import static org.apache.hadoop.hbase.ChoreService.CHORE_SERVICE_INITIAL_POOL_SIZE;
|
||||||
|
import static org.apache.hadoop.hbase.ChoreService.DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE;
|
||||||
import static org.apache.hadoop.hbase.HConstants.DEFAULT_HBASE_SPLIT_COORDINATED_BY_ZK;
|
import static org.apache.hadoop.hbase.HConstants.DEFAULT_HBASE_SPLIT_COORDINATED_BY_ZK;
|
||||||
import static org.apache.hadoop.hbase.HConstants.HBASE_SPLIT_WAL_COORDINATED_BY_ZK;
|
import static org.apache.hadoop.hbase.HConstants.HBASE_SPLIT_WAL_COORDINATED_BY_ZK;
|
||||||
|
|
||||||
|
@ -278,7 +280,9 @@ public abstract class HBaseServerBase<R extends HBaseRpcServicesBase<?>> extends
|
||||||
|
|
||||||
initializeFileSystem();
|
initializeFileSystem();
|
||||||
|
|
||||||
this.choreService = new ChoreService(getName(), true);
|
int choreServiceInitialSize =
|
||||||
|
conf.getInt(CHORE_SERVICE_INITIAL_POOL_SIZE, DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE);
|
||||||
|
this.choreService = new ChoreService(getName(), choreServiceInitialSize, true);
|
||||||
this.executorService = new ExecutorService(getName());
|
this.executorService = new ExecutorService(getName());
|
||||||
|
|
||||||
this.metaRegionLocationCache = new MetaRegionLocationCache(zooKeeper);
|
this.metaRegionLocationCache = new MetaRegionLocationCache(zooKeeper);
|
||||||
|
|
Loading…
Reference in New Issue