@InterfaceAudience.Private public interface ClusterConnection extends Connection
Modifier and Type | Field and Description |
---|---|
static String |
HBASE_CLIENT_CONNECTION_IMPL
Key for configuration in Configuration whose value is the class we implement making a new
Connection instance.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheLocation(TableName tableName,
RegionLocations location) |
void |
clearCaches(ServerName sn)
Clear any caches that pertain to server name
sn . |
default void |
clearRegionCache()
Deprecated.
|
void |
clearRegionCache(TableName tableName)
Allows flushing the region cache of all locations that pertain to
tableName |
void |
deleteCachedRegionLocation(HRegionLocation location)
Deletes cached locations for the specific region.
|
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface |
getAdmin(ServerName serverName)
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.
|
AsyncProcess |
getAsyncProcess()
Returns Default AsyncProcess associated with this connection.
|
ClientBackoffPolicy |
getBackoffPolicy()
Returns the configured client backoff policy
|
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface |
getClient(ServerName serverName)
Establishes a connection to the region server at the specified address, and returns a region
client protocol.
|
ConnectionConfiguration |
getConnectionConfiguration()
Returns a ConnectionConfiguration object holding parsed configuration values
|
MetricsConnection |
getConnectionMetrics()
Returns the MetricsConnection instance associated with this connection.
|
ConnectionRegistry |
getConnectionRegistry()
Get the
ConnectionRegistry used to orient this cluster. |
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()
Returns Nonce generator for this ClusterConnection; may be null if disabled in configuration.
|
HRegionLocation |
getRegionLocation(TableName tableName,
byte[] row,
boolean reload)
Find region location hosting passed row
|
RpcControllerFactory |
getRpcControllerFactory()
Returns Connection's RpcControllerFactory instance
|
RpcRetryingCallerFactory |
getRpcRetryingCallerFactory()
Returns Connection's RpcRetryingCallerFactory instance
|
ServerStatisticTracker |
getStatisticsTracker()
Returns the current statistics tracker associated with this connection
|
TableState |
getTableState(TableName tableName)
Retrieve TableState, represent current table state.
|
User |
getUser()
Get the
User associated with this connection. |
boolean |
hasCellBlockSupport()
Returns true when this connection uses a
Codec and so
supports cell blocks. |
boolean |
isMasterRunning()
Deprecated.
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)
Check if a table is disabled.
|
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)
Gets the locations of the region in the specified table, tableName, for a given row.
|
RegionLocations |
locateRegion(TableName tableName,
byte[] row,
boolean useCache,
boolean retry,
int replicaId)
Gets the locations of the region in the specified table, tableName, for a given row.
|
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.
|
void |
updateCachedLocations(TableName tableName,
byte[] regionName,
byte[] rowkey,
Object exception,
ServerName source)
Update the location cache.
|
clearRegionLocationCache, close, getAdmin, getBufferedMutator, getBufferedMutator, getClusterId, getConfiguration, getHbck, getHbck, getRegionLocator, getTable, getTable, getTableBuilder, isClosed
static final String HBASE_CLIENT_CONNECTION_IMPL
@Deprecated boolean isMasterRunning() throws MasterNotRunningException, ZooKeeperConnectionException
MasterNotRunningException
ZooKeeperConnectionException
boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws IOException
IOException
boolean isTableEnabled(TableName tableName) throws IOException
tableName
- table nameIOException
- if a remote or network exception occursboolean isTableDisabled(TableName tableName) throws IOException
tableName
- table nameIOException
- if a remote or network exception occursTableState getTableState(TableName tableName) throws IOException
tableName
- table state forIOException
HRegionLocation locateRegion(TableName tableName, byte[] row) throws IOException
tableName
- name of the table row is inrow
- row key you're trying to find the region ofIOException
- if a remote or network exception occurs@Deprecated default void clearRegionCache()
Connection.clearRegionLocationCache()
instead.void cacheLocation(TableName tableName, RegionLocations location)
void clearRegionCache(TableName tableName)
tableName
tableName
- Name of the table whose regions we are to remove from cache.void deleteCachedRegionLocation(HRegionLocation location)
location
- The location object for the region, to be purged from cache.HRegionLocation relocateRegion(TableName tableName, byte[] row) throws IOException
tableName
- name of the table row is inrow
- row key you're trying to find the region ofIOException
- if a remote or network exception occursRegionLocations relocateRegion(TableName tableName, byte[] row, int replicaId) throws IOException
tableName
- 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 occursvoid updateCachedLocations(TableName tableName, byte[] regionName, byte[] rowkey, Object exception, ServerName source)
tableName
- the table nameregionName
- the region namerowkey
- the rowexception
- the exception if any. Can be null.source
- the previous locationHRegionLocation locateRegion(byte[] regionName) throws IOException
regionName
- name of the region to locateIOException
- if a remote or network exception occursList<HRegionLocation> locateRegions(TableName tableName) throws IOException
tableName
- table to get regions ofIOException
- if IO failure occursList<HRegionLocation> locateRegions(TableName tableName, boolean useCache, boolean offlined) throws IOException
tableName
- 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 occursRegionLocations locateRegion(TableName tableName, byte[] row, boolean useCache, boolean retry) throws IOException
tableName
- table to get regions ofrow
- the rowuseCache
- Should we use the cache to retrieve the region information.retry
- do we retryIOException
- if IO failure occursRegionLocations locateRegion(TableName tableName, byte[] row, boolean useCache, boolean retry, int replicaId) throws IOException
tableName
- 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 occursMasterKeepAliveConnection getMaster() throws IOException
MasterKeepAliveConnection
to the active masterIOException
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface getAdminForMaster() throws IOException
IOException
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface getAdmin(ServerName serverName) throws IOException
serverName
- the region server to connect toIOException
- if a remote or network exception occursorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface getClient(ServerName serverName) throws IOException
serverName
- the region server to connect toIOException
- if a remote or network exception occursHRegionLocation getRegionLocation(TableName tableName, byte[] row, boolean reload) throws IOException
tableName
- table namerow
- Row to find.reload
- If true do not use cache, otherwise bypass.IOException
- if a remote or network exception occursvoid clearCaches(ServerName sn)
sn
.sn
- A server nameNonceGenerator getNonceGenerator()
AsyncProcess getAsyncProcess()
RpcRetryingCallerFactory getNewRpcRetryingCallerFactory(org.apache.hadoop.conf.Configuration conf)
Configuration
. This
RpcRetryingCallerFactory lets the users create RpcRetryingCaller
s which can be
intercepted with the configured RetryingCallerInterceptor
conf
- configuration nRpcRetryingCallerFactory getRpcRetryingCallerFactory()
RpcControllerFactory getRpcControllerFactory()
ConnectionConfiguration getConnectionConfiguration()
ServerStatisticTracker getStatisticsTracker()
ClientBackoffPolicy getBackoffPolicy()
MetricsConnection getConnectionMetrics()
boolean hasCellBlockSupport()
Codec
and so
supports cell blocks.ConnectionRegistry getConnectionRegistry()
ConnectionRegistry
used to orient this cluster.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.