File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
hbase-common/src/main/java/org/apache/hadoop/hbase
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ public class ChoreService {
5959 */
6060 @ InterfaceAudience .Private
6161 public final static int MIN_CORE_POOL_SIZE = 1 ;
62+ /**
63+ * The initial number of threads in the core pool for the {@link ChoreService}.
64+ */
65+ public static final String CHORE_SERVICE_INITIAL_POOL_SIZE =
66+ "hbase.choreservice.initial.pool.size" ;
67+ public static final int DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE = 1 ;
6268
6369 /**
6470 * This thread pool is used to schedule all of the Chores
Original file line number Diff line number Diff line change 1717 */
1818package org .apache .hadoop .hbase .regionserver ;
1919
20+ import static org .apache .hadoop .hbase .ChoreService .CHORE_SERVICE_INITIAL_POOL_SIZE ;
21+ import static org .apache .hadoop .hbase .ChoreService .DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE ;
2022import static org .apache .hadoop .hbase .HConstants .DEFAULT_HBASE_SPLIT_COORDINATED_BY_ZK ;
2123import static org .apache .hadoop .hbase .HConstants .DEFAULT_HBASE_SPLIT_WAL_MAX_SPLITTER ;
2224import static org .apache .hadoop .hbase .HConstants .DEFAULT_SLOW_LOG_SYS_TABLE_CHORE_DURATION ;
@@ -728,7 +730,9 @@ public HRegionServer(final Configuration conf) throws IOException {
728730 // and M (An M IS A HRS now). Need to refactor so less duplication between M and its super
729731 // Master expects Constructor to put up web servers. Ugh.
730732 // class HRS. TODO.
731- this .choreService = new ChoreService (getName (), true );
733+ int choreServiceInitialSize =
734+ conf .getInt (CHORE_SERVICE_INITIAL_POOL_SIZE , DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE );
735+ this .choreService = new ChoreService (getName (), choreServiceInitialSize , true );
732736 this .executorService = new ExecutorService (getName ());
733737 putUpWebUI ();
734738 span .setStatus (StatusCode .OK );
You can’t perform that action at this time.
0 commit comments