public static class ConnectionUtils.ShortCircuitingClusterConnection extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
clusterId |
static String |
RETRIES_BY_SERVER_KEY |
protected User |
user |
HBASE_CLIENT_CONNECTION_IMPL| 限定符和类型 | 方法和说明 |
|---|---|
void |
abort(String msg,
Throwable t)
Abort the server or client.
|
void |
cacheLocation(TableName tableName,
RegionLocations location)
Put a newly discovered HRegionLocation into the cache.
|
void |
clearCaches(ServerName serverName)
Clear any caches that pertain to server name
sn. |
void |
clearRegionCache()
Allows flushing the region cache.
|
void |
clearRegionCache(TableName tableName)
Allows flushing the region cache of all locations that pertain to
tableName |
void |
clearRegionCache(TableName tableName,
byte[] row) |
void |
close() |
void |
deleteCachedRegionLocation(HRegionLocation location)
Deletes cached locations for the specific region.
|
protected void |
finalize()
Close the connection for good.
|
Admin |
getAdmin()
Retrieve an Admin implementation to administer an HBase cluster.
|
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface |
getAdmin(ServerName sn)
Establishes a connection to the region server at the specified address.
|
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface |
getAdminForMaster()
Get the admin service for master.
|
org.apache.hadoop.hbase.client.AsyncProcess |
getAsyncProcess() |
ClientBackoffPolicy |
getBackoffPolicy() |
BufferedMutator |
getBufferedMutator(BufferedMutatorParams params)
Retrieve a
BufferedMutator for performing client-side buffering of writes. |
BufferedMutator |
getBufferedMutator(TableName tableName)
Retrieve a
BufferedMutator for performing client-side buffering of writes. |
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface |
getClient(ServerName sn)
Establishes a connection to the region server at the specified address, and returns
a region client protocol.
|
org.apache.hadoop.conf.Configuration |
getConfiguration() |
ConnectionConfiguration |
getConnectionConfiguration() |
MetricsConnection |
getConnectionMetrics() |
protected ExecutorService |
getCurrentBatchPool() |
protected ExecutorService |
getCurrentMetaLookupPool() |
int |
getCurrentNrHRS() |
org.apache.hadoop.hbase.client.MasterKeepAliveConnection |
getMaster()
Returns a
MasterKeepAliveConnection to the active master |
RpcRetryingCallerFactory |
getNewRpcRetryingCallerFactory(org.apache.hadoop.conf.Configuration conf)
Returns a new RpcRetryingCallerFactory from the given
Configuration. |
NonceGenerator |
getNonceGenerator() |
HRegionLocation |
getRegionLocation(TableName tableName,
byte[] row,
boolean reload)
Find region location hosting passed row
|
RegionLocator |
getRegionLocator(TableName tableName)
Retrieve a RegionLocator implementation to inspect region information on a table.
|
RpcControllerFactory |
getRpcControllerFactory() |
RpcRetryingCallerFactory |
getRpcRetryingCallerFactory() |
ServerStatisticTracker |
getStatisticsTracker() |
Table |
getTable(TableName tableName)
Retrieve a Table implementation for accessing a table.
|
TableBuilder |
getTableBuilder(TableName tableName,
ExecutorService pool)
Returns an
TableBuilder for creating Table. |
TableState |
getTableState(TableName tableName)
Retrieve TableState, represent current table state.
|
boolean |
hasCellBlockSupport() |
boolean |
isAborted()
Check if the server or client was aborted.
|
boolean |
isClosed()
Returns whether the connection is closed or not.
|
boolean |
isMasterRunning()
已过时。
this has been deprecated without a replacement
|
boolean |
isTableAvailable(TableName tableName,
byte[][] splitKeys)
Use this api to check if the table has been created with the specified number of
splitkeys which was used while creating the given table.
|
boolean |
isTableDisabled(TableName tableName) |
boolean |
isTableEnabled(TableName tableName)
A table that isTableEnabled == false and isTableDisabled == false
is possible.
|
HRegionLocation |
locateRegion(byte[] regionName)
Gets the location of the region of regionName.
|
HRegionLocation |
locateRegion(TableName tableName,
byte[] row)
Find the location of the region of tableName that row
lives in.
|
RegionLocations |
locateRegion(TableName tableName,
byte[] row,
boolean useCache,
boolean retry) |
RegionLocations |
locateRegion(TableName tableName,
byte[] row,
boolean useCache,
boolean retry,
int replicaId) |
List<HRegionLocation> |
locateRegions(TableName tableName)
Gets the locations of all regions in the specified table, tableName.
|
List<HRegionLocation> |
locateRegions(TableName tableName,
boolean useCache,
boolean offlined)
Gets the locations of all regions in the specified table, tableName.
|
HRegionLocation |
relocateRegion(TableName tableName,
byte[] row)
Find the location of the region of tableName that row
lives in, ignoring any value that might be in the cache.
|
RegionLocations |
relocateRegion(TableName tableName,
byte[] row,
int replicaId)
Find the location of the region of tableName that row
lives in, ignoring any value that might be in the cache.
|
protected void |
retrieveClusterId() |
String |
toString()
An identifier that will remain the same for a given connection.
|
void |
updateCachedLocations(TableName tableName,
byte[] regionName,
byte[] rowkey,
Object exception,
ServerName source)
Update the location with the new value (if the exception is a RegionMovedException)
or delete it from the cache.
|
getTablepublic org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface getAdmin(ServerName sn) throws IOException
ClusterConnectiongetAdmin 在接口中 ClusterConnectionsn - the region server to connect toIOException - if a remote or network exception occurspublic org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface getClient(ServerName sn) throws IOException
ClusterConnectiongetClient 在接口中 ClusterConnectionsn - the region server to connect toIOException - if a remote or network exception occurspublic org.apache.hadoop.hbase.client.MasterKeepAliveConnection getMaster() throws IOException
ClusterConnectionMasterKeepAliveConnection to the active mastergetMaster 在接口中 ClusterConnectionIOExceptionpublic Table getTable(TableName tableName) throws IOException
Connection
The caller is responsible for calling Table.close() on the returned
table instance.
Since 0.98.1 this method no longer checks table existence. An exception will be thrown if the table does not exist only when the first operation is attempted.
getTable 在接口中 ConnectiontableName - the name of the tableIOExceptionpublic TableBuilder getTableBuilder(TableName tableName, ExecutorService pool)
ConnectionTableBuilder for creating Table.getTableBuilder 在接口中 ConnectiontableName - the name of the tablepool - the thread pool to use for requests like batch and scanpublic BufferedMutator getBufferedMutator(BufferedMutatorParams params)
ConnectionBufferedMutator for performing client-side buffering of writes. The
BufferedMutator returned by this method is thread-safe. This object can be used for
long lived table operations. The caller is responsible for calling
BufferedMutator.close() on the returned BufferedMutator instance.getBufferedMutator 在接口中 Connectionparams - details on how to instantiate the BufferedMutator.BufferedMutator for the supplied tableName.public BufferedMutator getBufferedMutator(TableName tableName)
Connection
Retrieve a BufferedMutator for performing client-side buffering of writes. The
BufferedMutator returned by this method is thread-safe. This BufferedMutator will
use the Connection's ExecutorService. This object can be used for long lived operations.
The caller is responsible for calling BufferedMutator.close() on
the returned BufferedMutator instance.
This accessor will use the connection's ExecutorService and will throw an exception in the main thread when an asynchronous exception occurs.
getBufferedMutator 在接口中 ConnectiontableName - the name of the tableBufferedMutator for the supplied tableName.public RegionLocator getRegionLocator(TableName tableName) throws IOException
ConnectionCloseable.close() on the returned
RegionLocator instance.
RegionLocator needs to be unmanagedgetRegionLocator 在接口中 ConnectiontableName - Name of the table who's region is to be examinedIOExceptionpublic Admin getAdmin() throws IOException
ConnectionAdmin.close() on the returned
Admin instance.getAdmin 在接口中 ConnectionIOExceptionpublic MetricsConnection getConnectionMetrics()
getConnectionMetrics 在接口中 ClusterConnectionprotected ExecutorService getCurrentMetaLookupPool()
protected ExecutorService getCurrentBatchPool()
public String toString()
protected void retrieveClusterId()
public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration 在接口中 Connection@Deprecated public boolean isMasterRunning() throws MasterNotRunningException, ZooKeeperConnectionException
isMasterRunning 在接口中 ClusterConnectionMasterNotRunningException - - if the master is not runningZooKeeperConnectionExceptionpublic HRegionLocation getRegionLocation(TableName tableName, byte[] row, boolean reload) throws IOException
ClusterConnectiongetRegionLocation 在接口中 ClusterConnectiontableName - table namerow - Row to find.reload - If true do not use cache, otherwise bypass.IOException - if a remote or network exception occurspublic boolean isTableEnabled(TableName tableName) throws IOException
ClusterConnectionisTableEnabled 在接口中 ClusterConnectiontableName - table nameIOException - if a remote or network exception occurspublic boolean isTableDisabled(TableName tableName) throws IOException
isTableDisabled 在接口中 ClusterConnectiontableName - table nameIOException - if a remote or network exception occurspublic boolean isTableAvailable(TableName tableName, @Nullable byte[][] splitKeys) throws IOException
ClusterConnectionisTableAvailable 在接口中 ClusterConnectiontableName - tableNamesplitKeys - splitKeys used while creating tableIOException - if a remote or network exception occurspublic HRegionLocation locateRegion(byte[] regionName) throws IOException
ClusterConnectionlocateRegion 在接口中 ClusterConnectionregionName - name of the region to locateIOException - if a remote or network exception occurspublic List<HRegionLocation> locateRegions(TableName tableName) throws IOException
ClusterConnectionlocateRegions 在接口中 ClusterConnectiontableName - table to get regions ofIOException - if IO failure occurspublic List<HRegionLocation> locateRegions(TableName tableName, boolean useCache, boolean offlined) throws IOException
ClusterConnectionlocateRegions 在接口中 ClusterConnectiontableName - table to get regions ofuseCache - Should we use the cache to retrieve the region information.offlined - True if we are to include offlined regions, false and we'll leave out offlined
regions from returned list.IOException - if IO failure occurspublic HRegionLocation locateRegion(TableName tableName, byte[] row) throws IOException
ClusterConnectionlocateRegion 在接口中 ClusterConnectiontableName - name of the table row is inrow - row key you're trying to find the region ofIOException - if a remote or network exception occurspublic HRegionLocation relocateRegion(TableName tableName, byte[] row) throws IOException
ClusterConnectionrelocateRegion 在接口中 ClusterConnectiontableName - name of the table row is inrow - row key you're trying to find the region ofIOException - if a remote or network exception occurspublic RegionLocations relocateRegion(TableName tableName, byte[] row, int replicaId) throws IOException
ClusterConnectionrelocateRegion 在接口中 ClusterConnectiontableName - name of the table row is inrow - row key you're trying to find the region ofreplicaId - the replicaId of the regionIOException - if a remote or network exception occurspublic RegionLocations locateRegion(TableName tableName, byte[] row, boolean useCache, boolean retry) throws IOException
locateRegion 在接口中 ClusterConnectiontableName - table to get regions ofrow - the rowuseCache - Should we use the cache to retrieve the region information.retry - do we retryIOException - if IO failure occurspublic RegionLocations locateRegion(TableName tableName, byte[] row, boolean useCache, boolean retry, int replicaId) throws IOException
locateRegion 在接口中 ClusterConnectiontableName - table to get regions ofrow - the rowuseCache - Should we use the cache to retrieve the region information.retry - do we retryreplicaId - the replicaId for the regionIOException - if IO failure occurspublic void cacheLocation(TableName tableName, RegionLocations location)
cacheLocation 在接口中 ClusterConnectiontableName - The table name.location - the new locationpublic void clearRegionCache(TableName tableName, byte[] row)
public void clearCaches(ServerName serverName)
ClusterConnectionsn.clearCaches 在接口中 ClusterConnectionserverName - A server namepublic void clearRegionCache()
ClusterConnectionclearRegionCache 在接口中 ClusterConnectionpublic void clearRegionCache(TableName tableName)
ClusterConnectiontableNameclearRegionCache 在接口中 ClusterConnectiontableName - Name of the table whose regions we are to remove from
cache.public org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface getAdminForMaster() throws IOException
ClusterConnectiongetAdminForMaster 在接口中 ClusterConnectionIOExceptionpublic void deleteCachedRegionLocation(HRegionLocation location)
ClusterConnectiondeleteCachedRegionLocation 在接口中 ClusterConnectionlocation - The location object for the region, to be purged from cache.public void updateCachedLocations(TableName tableName, byte[] regionName, byte[] rowkey, Object exception, ServerName source)
updateCachedLocations 在接口中 ClusterConnectionexception - an object (to simplify user code) on which we will try to find a nested
or wrapped or both RegionMovedExceptionsource - server that is the source of the location update.tableName - the table nameregionName - the region namerowkey - the rowpublic org.apache.hadoop.hbase.client.AsyncProcess getAsyncProcess()
getAsyncProcess 在接口中 ClusterConnectionpublic ServerStatisticTracker getStatisticsTracker()
getStatisticsTracker 在接口中 ClusterConnectionpublic ClientBackoffPolicy getBackoffPolicy()
getBackoffPolicy 在接口中 ClusterConnectionpublic boolean isClosed()
ConnectionisClosed 在接口中 Connectionpublic boolean isAborted()
Abortablepublic int getCurrentNrHRS()
throws IOException
getCurrentNrHRS 在接口中 ClusterConnectionIOException - if a remote or network exception occurspublic void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 Connectionprotected void finalize()
throws Throwable
public NonceGenerator getNonceGenerator()
getNonceGenerator 在接口中 ClusterConnectionpublic TableState getTableState(TableName tableName) throws IOException
ClusterConnectiongetTableState 在接口中 ClusterConnectiontableName - table state forIOExceptionpublic RpcRetryingCallerFactory getNewRpcRetryingCallerFactory(org.apache.hadoop.conf.Configuration conf)
ClusterConnectionConfiguration.
This RpcRetryingCallerFactory lets the users create RpcRetryingCallers which can be
intercepted with the configured RetryingCallerInterceptorgetNewRpcRetryingCallerFactory 在接口中 ClusterConnectionconf - configurationpublic boolean hasCellBlockSupport()
hasCellBlockSupport 在接口中 ClusterConnectionCodec and so
supports cell blocks.public ConnectionConfiguration getConnectionConfiguration()
getConnectionConfiguration 在接口中 ClusterConnectionpublic RpcRetryingCallerFactory getRpcRetryingCallerFactory()
getRpcRetryingCallerFactory 在接口中 ClusterConnectionpublic RpcControllerFactory getRpcControllerFactory()
getRpcControllerFactory 在接口中 ClusterConnectionCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.