You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2011/12/19 07:57:22 UTC

svn commit: r1220628 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HTable.java

Author: larsh
Date: Mon Dec 19 06:57:22 2011
New Revision: 1220628

URL: http://svn.apache.org/viewvc?rev=1220628&view=rev
Log:
HBASE-4970  Add a parameter so that keepAliveTime of Htable thread pool can be changed (gaojinchao)

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HTable.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1220628&r1=1220627&r2=1220628&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Mon Dec 19 06:57:22 2011
@@ -885,6 +885,11 @@ Release 0.92.0 - Unreleased
    HBASE-3025  Coprocessor based access control
    HBASE-2418  Support for ZooKeeper authentication
 
+Release 0.90.6 - Unreleased
+
+  BUG FIXES
+   HBASE-4970  Add a parameter so that keepAliveTime of Htable thread pool can be changed (gaojinchao)
+
 Release 0.90.5 - Unreleased
 
   BUG FIXES

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1220628&r1=1220627&r2=1220628&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HTable.java Mon Dec 19 06:57:22 2011
@@ -198,12 +198,14 @@ public class HTable implements HTableInt
     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,
+        keepAliveTime, TimeUnit.SECONDS,
         new SynchronousQueue<Runnable>(),
         new DaemonThreadFactory());
     ((ThreadPoolExecutor)this.pool).allowCoreThreadTimeOut(true);