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 @@ -58,6 +58,12 @@ public class ChoreService {
5858   */ 
5959  @ InterfaceAudience .Private 
6060  public  final  static  int  MIN_CORE_POOL_SIZE  = 1 ;
61+   /** 
62+    * The initial number of threads in the core pool for the {@link ChoreService}. 
63+    */ 
64+   public  static  final  String  CHORE_SERVICE_INITIAL_POOL_SIZE  =
65+     "hbase.choreservice.initial.pool.size" ;
66+   public  static  final  int  DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE  = 1 ;
6167
6268  /** 
6369   * 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 .HBASE_SPLIT_WAL_COORDINATED_BY_ZK ;
@@ -681,7 +683,9 @@ public HRegionServer(final Configuration conf) throws IOException {
681683      // and M (An M IS A HRS now). Need to refactor so less duplication between M and its super 
682684      // Master expects Constructor to put up web servers. Ugh. 
683685      // class HRS. TODO. 
684-       this .choreService  = new  ChoreService (getName (), true );
686+       int  choreServiceInitialSize  =
687+         conf .getInt (CHORE_SERVICE_INITIAL_POOL_SIZE , DEFAULT_CHORE_SERVICE_INITIAL_POOL_SIZE );
688+       this .choreService  = new  ChoreService (getName (), choreServiceInitialSize , true );
685689      this .executorService  = new  ExecutorService (getName ());
686690      putUpWebUI ();
687691    } catch  (Throwable  t ) {
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments