Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.catalog.MetaStoreClientPool Class Reference
Collaboration diagram for com.cloudera.impala.catalog.MetaStoreClientPool:

Classes

class  MetaStoreClient
 

Public Member Functions

 MetaStoreClientPool (int initialSize)
 
 MetaStoreClientPool (int initialSize, HiveConf hiveConf)
 
void addClients (int numClients)
 
MetaStoreClient getClient ()
 
void close ()
 

Private Attributes

final int clientCreationDelayMs_
 
final ConcurrentLinkedQueue
< MetaStoreClient
clientPool_
 
Boolean poolClosed_ = false
 
final HiveConf hiveConf_
 

Static Private Attributes

static final String HIVE_METASTORE_CNXN_DELAY_MS_CONF
 
static final int DEFAULT_HIVE_METASTORE_CNXN_DELAY_MS_CONF = 0
 
static final Logger LOG = Logger.getLogger(MetaStoreClientPool.class)
 

Detailed Description

Manages a pool of HiveMetaStoreClient connections. If the connection pool is empty a new client is created and added to the pool. There is no size limit.

Definition at line 29 of file MetaStoreClientPool.java.

Constructor & Destructor Documentation

com.cloudera.impala.catalog.MetaStoreClientPool.MetaStoreClientPool ( int  initialSize)
inline

Definition at line 100 of file MetaStoreClientPool.java.

Member Function Documentation

void com.cloudera.impala.catalog.MetaStoreClientPool.addClients ( int  numClients)
inline
void com.cloudera.impala.catalog.MetaStoreClientPool.close ( )
inline

Removes all items from the connection pool and closes all Hive Meta Store client connections. Can be called multiple times.

Definition at line 160 of file MetaStoreClientPool.java.

References com.cloudera.impala.catalog.MetaStoreClientPool.clientPool_, and com.cloudera.impala.catalog.MetaStoreClientPool.poolClosed_.

MetaStoreClient com.cloudera.impala.catalog.MetaStoreClientPool.getClient ( )
inline

Gets a client from the pool. If the pool is empty a new client is created.

Definition at line 123 of file MetaStoreClientPool.java.

References com.cloudera.impala.catalog.MetaStoreClientPool.clientCreationDelayMs_, and com.cloudera.impala.catalog.MetaStoreClientPool.hiveConf_.

Member Data Documentation

final int com.cloudera.impala.catalog.MetaStoreClientPool.clientCreationDelayMs_
private
final ConcurrentLinkedQueue<MetaStoreClient> com.cloudera.impala.catalog.MetaStoreClientPool.clientPool_
private
Initial value:
=
new ConcurrentLinkedQueue<MetaStoreClient>()

Definition at line 40 of file MetaStoreClientPool.java.

Referenced by com.cloudera.impala.catalog.MetaStoreClientPool.close().

final int com.cloudera.impala.catalog.MetaStoreClientPool.DEFAULT_HIVE_METASTORE_CNXN_DELAY_MS_CONF = 0
staticprivate
final String com.cloudera.impala.catalog.MetaStoreClientPool.HIVE_METASTORE_CNXN_DELAY_MS_CONF
staticprivate
Initial value:
=
"impala.catalog.metastore.cnxn.creation.delay.ms"

Definition at line 31 of file MetaStoreClientPool.java.

Referenced by com.cloudera.impala.catalog.MetaStoreClientPool.MetaStoreClientPool().

final HiveConf com.cloudera.impala.catalog.MetaStoreClientPool.hiveConf_
private
final Logger com.cloudera.impala.catalog.MetaStoreClientPool.LOG = Logger.getLogger(MetaStoreClientPool.class)
staticprivate

Definition at line 38 of file MetaStoreClientPool.java.

Boolean com.cloudera.impala.catalog.MetaStoreClientPool.poolClosed_ = false
private

The documentation for this class was generated from the following file: