HBASE-8948 Bound table pool size in Thrift 2 server
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1505321 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4fa2e6c37c
commit
53ed511717
|
@ -864,21 +864,30 @@ possible configurations would overwhelm and obscure the important.
|
|||
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
|
||||
|
|
|
@ -99,7 +99,8 @@ public class ThriftHBaseServiceHandler implements THBaseService.Iface {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue