hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1220629 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HTable.java
Date Mon, 19 Dec 2011 06:58:20 GMT
Author: larsh
Date: Mon Dec 19 06:58:20 2011
New Revision: 1220629

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

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

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1220629&r1=1220628&r2=1220629&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Mon Dec 19 06:58:20 2011
@@ -6,6 +6,7 @@ Release 0.90.6 - Unreleased
    HBASE-5020  MetaReader#fullScan doesn't stop scanning when vistor returns
                false in 0.90 version (Chunhui Shen)
    HBASE-4893  HConnectionImplementation is closed but not deleted (Mubarak)
+   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.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1220629&r1=1220628&r2=1220629&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java Mon Dec 19
06:58:20 2011
@@ -202,13 +202,15 @@ 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);



Mime
View raw message