You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by chenwenhui <c7...@163.com> on 2014/07/16 11:51:08 UTC

What is the pool size when using HConnection.getTable(String)?

The HTablePool has been deprecated, and suggest to use HConnection.getTable(String) instead.
The pool size can be set by maxSize parameger when constructing HTablePool object, but when using HConnection object, i do not find any way to set the pool size. Is it no limit on pool size by default? 

Re:Re: What is the pool size when using HConnection.getTable(String)?

Posted by chenwenhui <c7...@163.com>.
ok, i see it, thank you!








At 2014-07-16 10:23:19, "Ted Yu" <yu...@gmail.com> wrote:
>Please take a look at getBatchPool() in HConnectionManager (in trunk it
>would be ConnectionManager)
>
>            int maxThreads = conf.getInt("hbase.hconnection.threads.max",
>256);
>
>            int coreThreads = conf.getInt("hbase.hconnection.threads.core",
>256);
>
>You can use this method if you want to use your own ExecutorService :
>
>public HTableInterface getTable(String tableName, ExecutorService pool)
>throws IOException {
>
>Cheers
>
>
>On Wed, Jul 16, 2014 at 2:51 AM, chenwenhui <c7...@163.com> wrote:
>
>> The HTablePool has been deprecated, and suggest to use
>> HConnection.getTable(String) instead.
>> The pool size can be set by maxSize parameger when constructing HTablePool
>> object, but when using HConnection object, i do not find any way to set the
>> pool size. Is it no limit on pool size by default?

Re: What is the pool size when using HConnection.getTable(String)?

Posted by Ted Yu <yu...@gmail.com>.
Please take a look at getBatchPool() in HConnectionManager (in trunk it
would be ConnectionManager)

            int maxThreads = conf.getInt("hbase.hconnection.threads.max",
256);

            int coreThreads = conf.getInt("hbase.hconnection.threads.core",
256);

You can use this method if you want to use your own ExecutorService :

public HTableInterface getTable(String tableName, ExecutorService pool)
throws IOException {

Cheers


On Wed, Jul 16, 2014 at 2:51 AM, chenwenhui <c7...@163.com> wrote:

> The HTablePool has been deprecated, and suggest to use
> HConnection.getTable(String) instead.
> The pool size can be set by maxSize parameger when constructing HTablePool
> object, but when using HConnection object, i do not find any way to set the
> pool size. Is it no limit on pool size by default?