hbase java连接池_java – Hbase连接池

Class HTablePool

java.lang.Object org.apache.hadoop.hbase.client.HTablePool

All Implemented Interfaces:

Closeable, AutoCloseable

Deprecated. Use HConnection.getTable(String) instead.

public class HTablePool extends Object implements Closeable

A simple pool of HTable instances. Each HTablePool acts as a pool for

all tables. To use, instantiate an HTablePool and use getTable(String)

to get an HTable from the pool. This method is not needed anymore,

clients should call HTableInterface.close() rather than returning the

tables to the pool Once you are done with it, close your instance of

HTableInterface by calling HTableInterface.close() rather than

returning the tables to the pool with (deprecated)

putTable(HTableInterface). A pool can be created with a maxSize which

defines the most HTable references that will ever be retained for each

table. Otherwise the default is Integer.MAX_VALUE.

Pool will manage its own connections to the cluster. See

HConnectionManager.


版权声明:本文为weixin_27531501原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。