org.apache.hadoop.hbase.client
Class HConnectionManager

java.lang.Object
  extended by org.apache.hadoop.hbase.client.HConnectionManager
All Implemented Interfaces:
HConstants
Direct Known Subclasses:
ServerConnectionManager

public class HConnectionManager
extends Object
implements HConstants

A non-instantiable class that manages connections to multiple tables in multiple HBase instances. Used by HTable and HBaseAdmin


Nested Class Summary
static class HConnectionManager.ClientZKWatcher
          This class is responsible to handle connection and reconnection to a zookeeper quorum.
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.HConstants
HConstants.Modify
 
Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.HConstants
ALL_VERSIONS, CATALOG_FAMILY, CATALOG_FAMILY_STR, CATALOG_HISTORIAN_FAMILY, CLUSTER_DISTRIBUTED, CLUSTER_IS_DISTRIBUTED, CLUSTER_IS_LOCAL, DEFAULT_HOST, DEFAULT_MASTER_INFOPORT, DEFAULT_MASTER_PORT, DEFAULT_MAX_FILE_SIZE, DEFAULT_REGION_SERVER_CLASS, DEFAULT_REGIONSERVER_INFOPORT, DEFAULT_REGIONSERVER_PORT, DEFAULT_SIZE_RESERVATION_BLOCK, DEFAULT_ZOOKEEPER_PAUSE, DEFAULT_ZOOKEEPER_RETRIES, EMPTY_BYTE_ARRAY, EMPTY_END_ROW, EMPTY_START_ROW, FILE_SYSTEM_VERSION, FOREVER, HBASE_CLIENT_RETRIES_NUMBER_KEY, HBASE_DIR, HREGION_COMPACTIONDIR_NAME, HREGION_LOGDIR_NAME, HREGION_OLDLOGFILE_NAME, IN_MEMORY, LAST_ROW, LATEST_TIMESTAMP, LATEST_TIMESTAMP_BYTES, MAJOR_COMPACTION_PERIOD, MASTER_PORT, MAX_ROW_LENGTH, MAXIMUM_VALUE_LENGTH, META_ROW_DELIMITER, META_TABLE_NAME, NAME, NINES, REGION_SERVER_CLASS, REGION_SERVER_IMPL, REGIONINFO_QUALIFIER, REGIONSERVER_PORT, RETRY_BACKOFF, ROOT_TABLE_NAME, SERVER_QUALIFIER, SPLITA_QUALIFIER, SPLITB_QUALIFIER, STARTCODE_QUALIFIER, THREAD_WAKE_FREQUENCY, UTF8_ENCODING, VERSION_FILE_NAME, VERSIONS, WEEK_IN_SECONDS, ZERO_L, ZEROES, ZOOKEEPER_CONFIG_NAME, ZOOKEEPER_PAUSE, ZOOKEEPER_QUORUM, ZOOKEEPER_RETRIES
 
Constructor Summary
protected HConnectionManager()
           
 
Method Summary
static void deleteAllConnections(boolean stopProxy)
          Delete information for all connections.
static void deleteConnectionInfo(HBaseConfiguration conf, boolean stopProxy)
          Delete connection information for the instance specified by configuration
static HConnectionManager.ClientZKWatcher getClientZooKeeperWatcher(HBaseConfiguration conf)
          Get a watcher of a zookeeper connection for a given quorum address.
static HConnection getConnection(HBaseConfiguration conf)
          Get the connection object for the instance specified by the configuration If no current connection exists, create a new connection for that instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HConnectionManager

protected HConnectionManager()
Method Detail

getConnection

public static HConnection getConnection(HBaseConfiguration conf)
Get the connection object for the instance specified by the configuration If no current connection exists, create a new connection for that instance

Parameters:
conf -
Returns:
HConnection object for the instance specified by the configuration

deleteConnectionInfo

public static void deleteConnectionInfo(HBaseConfiguration conf,
                                        boolean stopProxy)
Delete connection information for the instance specified by configuration

Parameters:
conf -
stopProxy -

deleteAllConnections

public static void deleteAllConnections(boolean stopProxy)
Delete information for all connections.

Parameters:
stopProxy -

getClientZooKeeperWatcher

public static HConnectionManager.ClientZKWatcher getClientZooKeeperWatcher(HBaseConfiguration conf)
                                                                    throws IOException
Get a watcher of a zookeeper connection for a given quorum address. If the connection isn't established, a new one is created. This acts like a multiton.

Parameters:
conf -
Returns:
ZKW watcher
Throws:
IOException


Copyright © 2009 The Apache Software Foundation