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 2013/07/21 11:30:52 UTC
svn commit: r1505321 - in /hbase/trunk:
hbase-common/src/main/resources/hbase-default.xml
hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
Author: larsgeorge
Date: Sun Jul 21 09:30:52 2013
New Revision: 1505321
URL: http://svn.apache.org/r1505321
Log:
HBASE-8948 Bound table pool size in Thrift 2 server
Modified:
hbase/trunk/hbase-common/src/main/resources/hbase-default.xml
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
Modified: hbase/trunk/hbase-common/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/resources/hbase-default.xml?rev=1505321&r1=1505320&r2=1505321&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/resources/hbase-default.xml (original)
+++ hbase/trunk/hbase-common/src/main/resources/hbase-default.xml Sun Jul 21 09:30:52 2013
@@ -864,21 +864,30 @@ possible configurations would overwhelm
After that, the server starts dropping connections.</description>
</property>
<property>
- <name>hbase.thrift.maxQueuedRequests</name>
- <value>1000</value>
- <description>The maximum number of pending Thrift connections waiting in the queue. If
+ <name>hbase.thrift.maxQueuedRequests</name>
+ <value>1000</value>
+ <description>The maximum number of pending Thrift connections waiting in the queue. If
there are no idle threads in the pool, the server queues requests. Only
when the queue overflows, new threads are added, up to
hbase.thrift.maxQueuedRequests threads.</description>
- </property>
- <property>
- <name>hbase.offheapcache.percentage</name>
- <value>0</value>
- <description>The amount of off heap space to be allocated towards the experimental
+ </property>
+ <property>
+ <name>hbase.thrift.htablepool.size.max</name>
+ <value>1000</value>
+ <description>The upper bound for the table pool used in the Thrift gateways server.
+ Since this is per table name, we assume a single table and so with 1000 default
+ worker threads max this is set to a matching number. For other workloads this number
+ can be adjusted as needed.
+ </description>
+ </property>
+ <property>
+ <name>hbase.offheapcache.percentage</name>
+ <value>0</value>
+ <description>The amount of off heap space to be allocated towards the experimental
off heap cache. If you desire the cache to be disabled, simply set this
value to 0.</description>
- </property>
- <property>
+ </property>
+ <property>
<name>hbase.data.umask.enable</name>
<value>false</value>
<description>Enable, if true, that file permissions should be assigned
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java?rev=1505321&r1=1505320&r2=1505321&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java Sun Jul 21 09:30:52 2013
@@ -99,7 +99,8 @@ public class ThriftHBaseServiceHandler i
}
ThriftHBaseServiceHandler(Configuration conf) {
- htablePool = new HTablePool(conf, Integer.MAX_VALUE);
+ int maxPoolSize = conf.getInt("hbase.thrift.htablepool.size.max", 1000);
+ htablePool = new HTablePool(conf, maxPoolSize);
}
private HTableInterface getTable(ByteBuffer tableName) {