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
|
@ -871,6 +871,15 @@ possible configurations would overwhelm and obscure the important.
|
|||
when the queue overflows, new threads are added, up to
|
||||
hbase.thrift.maxQueuedRequests threads.</description>
|
||||
</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>
|
||||
|
|
|
@ -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