Index: src/main/java/org/apache/hadoop/hbase/client/HTable.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/HTable.java (revision 1213653) +++ src/main/java/org/apache/hadoop/hbase/client/HTable.java (working copy) @@ -169,13 +169,14 @@ if (maxThreads == 0) { maxThreads = 1; // is there a better default? } + long keepAliveTime = conf.getLong("hbase.htable.threads.keepalivetime", 60); + // Using the "direct handoff" approach, new threads will only be created // if it is necessary and will grow unbounded. This could be bad but in HCM // we only create as many Runnables as there are region servers. It means // it also scales when new region servers are added. - this.pool = new ThreadPoolExecutor(1, maxThreads, - 60, TimeUnit.SECONDS, - new SynchronousQueue(), + this.pool = new ThreadPoolExecutor(1, maxThreads, keepAliveTime, + TimeUnit.SECONDS, new SynchronousQueue(), new DaemonThreadFactory()); ((ThreadPoolExecutor)this.pool).allowCoreThreadTimeOut(true);