@InterfaceAudience.Private @InterfaceStability.Evolving public class CoprocessorHConnection extends Object implements HConnection
You should not use this class from any client - its an internal class meant for use by the coprocessor framework.
HBASE_CLIENT_CONNECTION_IMPL| Constructor and Description |
|---|
CoprocessorHConnection(HConnection delegate,
HRegionServer server) |
public CoprocessorHConnection(HConnection delegate, HRegionServer server)
public static HConnection getConnectionForEnvironment(CoprocessorEnvironment env) throws IOException
HConnection based on the environment in which we are running the
coprocessor. The HConnection must be externally cleaned up (we bypass the usual HTable
cleanup mechanisms since we own everything).env - environment hosting the HConnectionHConnection.IOException - if we cannot create the basic connectionpublic ClientProtos.ClientService.BlockingInterface getClient(ServerName serverName) throws IOException
getClient in interface HConnectionIOExceptionpublic org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration in interface HConnectionpublic HTableInterface getTable(String tableName) throws IOException
getTable in interface HConnectionIOExceptionpublic HTableInterface getTable(byte[] tableName) throws IOException
getTable in interface HConnectionIOExceptionpublic HTableInterface getTable(TableName tableName) throws IOException
getTable in interface HConnectionIOExceptionpublic HTableInterface getTable(String tableName, ExecutorService pool) throws IOException
getTable in interface HConnectionIOExceptionpublic HTableInterface getTable(byte[] tableName, ExecutorService pool) throws IOException
getTable in interface HConnectionIOExceptionpublic HTableInterface getTable(TableName tableName, ExecutorService pool) throws IOException
getTable in interface HConnectionIOExceptionpublic boolean isMasterRunning()
throws MasterNotRunningException,
ZooKeeperConnectionException
isMasterRunning in interface HConnectionMasterNotRunningExceptionZooKeeperConnectionExceptionpublic boolean isTableEnabled(TableName tableName) throws IOException
isTableEnabled in interface HConnectionIOExceptionpublic boolean isTableEnabled(byte[] tableName)
throws IOException
isTableEnabled in interface HConnectionIOExceptionpublic boolean isTableDisabled(TableName tableName) throws IOException
isTableDisabled in interface HConnectionIOExceptionpublic boolean isTableDisabled(byte[] tableName)
throws IOException
isTableDisabled in interface HConnectionIOExceptionpublic boolean isTableAvailable(TableName tableName) throws IOException
isTableAvailable in interface HConnectionIOExceptionpublic boolean isTableAvailable(byte[] tableName)
throws IOException
isTableAvailable in interface HConnectionIOExceptionpublic boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws IOException
isTableAvailable in interface HConnectionIOExceptionpublic boolean isTableAvailable(byte[] tableName,
byte[][] splitKeys)
throws IOException
isTableAvailable in interface HConnectionIOExceptionpublic HTableDescriptor[] listTables() throws IOException
listTables in interface HConnectionIOExceptionpublic String[] getTableNames() throws IOException
getTableNames in interface HConnectionIOExceptionpublic TableName[] listTableNames() throws IOException
listTableNames in interface HConnectionIOExceptionpublic HTableDescriptor getHTableDescriptor(TableName tableName) throws IOException
getHTableDescriptor in interface HConnectionIOExceptionpublic HTableDescriptor getHTableDescriptor(byte[] tableName) throws IOException
getHTableDescriptor in interface HConnectionIOExceptionpublic HRegionLocation locateRegion(TableName tableName, byte[] row) throws IOException
locateRegion in interface HConnectionIOExceptionpublic HRegionLocation locateRegion(byte[] tableName, byte[] row) throws IOException
locateRegion in interface HConnectionIOExceptionpublic void clearRegionCache()
clearRegionCache in interface HConnectionpublic void clearRegionCache(TableName tableName)
clearRegionCache in interface HConnectionpublic void clearRegionCache(byte[] tableName)
clearRegionCache in interface HConnectionpublic HRegionLocation relocateRegion(TableName tableName, byte[] row) throws IOException
relocateRegion in interface HConnectionIOExceptionpublic HRegionLocation relocateRegion(byte[] tableName, byte[] row) throws IOException
relocateRegion in interface HConnectionIOExceptionpublic void updateCachedLocations(TableName tableName, byte[] rowkey, Object exception, HRegionLocation source)
updateCachedLocations in interface HConnectionpublic void updateCachedLocations(byte[] tableName,
byte[] rowkey,
Object exception,
HRegionLocation source)
updateCachedLocations in interface HConnectionpublic HRegionLocation locateRegion(byte[] regionName) throws IOException
locateRegion in interface HConnectionIOExceptionpublic List<HRegionLocation> locateRegions(TableName tableName) throws IOException
locateRegions in interface HConnectionIOExceptionpublic List<HRegionLocation> locateRegions(byte[] tableName) throws IOException
locateRegions in interface HConnectionIOExceptionpublic List<HRegionLocation> locateRegions(TableName tableName, boolean useCache, boolean offlined) throws IOException
locateRegions in interface HConnectionIOExceptionpublic List<HRegionLocation> locateRegions(byte[] tableName, boolean useCache, boolean offlined) throws IOException
locateRegions in interface HConnectionIOExceptionpublic MasterProtos.MasterService.BlockingInterface getMaster() throws IOException
getMaster in interface HConnectionIOExceptionpublic AdminProtos.AdminService.BlockingInterface getAdmin(ServerName serverName) throws IOException
getAdmin in interface HConnectionIOExceptionpublic AdminProtos.AdminService.BlockingInterface getAdmin(ServerName serverName, boolean getMaster) throws IOException
getAdmin in interface HConnectionIOExceptionpublic HRegionLocation getRegionLocation(TableName tableName, byte[] row, boolean reload) throws IOException
getRegionLocation in interface HConnectionIOExceptionpublic HRegionLocation getRegionLocation(byte[] tableName, byte[] row, boolean reload) throws IOException
getRegionLocation in interface HConnectionIOExceptionpublic void processBatch(List<? extends Row> actions, TableName tableName, ExecutorService pool, Object[] results) throws IOException, InterruptedException
processBatch in interface HConnectionIOExceptionInterruptedExceptionpublic void processBatch(List<? extends Row> actions, byte[] tableName, ExecutorService pool, Object[] results) throws IOException, InterruptedException
processBatch in interface HConnectionIOExceptionInterruptedExceptionpublic <R> void processBatchCallback(List<? extends Row> list, TableName tableName, ExecutorService pool, Object[] results, Batch.Callback<R> callback) throws IOException, InterruptedException
processBatchCallback in interface HConnectionIOExceptionInterruptedExceptionpublic <R> void processBatchCallback(List<? extends Row> list, byte[] tableName, ExecutorService pool, Object[] results, Batch.Callback<R> callback) throws IOException, InterruptedException
processBatchCallback in interface HConnectionIOExceptionInterruptedExceptionpublic void setRegionCachePrefetch(TableName tableName, boolean enable)
setRegionCachePrefetch in interface HConnectionpublic void setRegionCachePrefetch(byte[] tableName,
boolean enable)
setRegionCachePrefetch in interface HConnectionpublic boolean getRegionCachePrefetch(TableName tableName)
getRegionCachePrefetch in interface HConnectionpublic boolean getRegionCachePrefetch(byte[] tableName)
getRegionCachePrefetch in interface HConnectionpublic int getCurrentNrHRS()
throws IOException
getCurrentNrHRS in interface HConnectionIOExceptionpublic HTableDescriptor[] getHTableDescriptorsByTableName(List<TableName> tableNames) throws IOException
getHTableDescriptorsByTableName in interface HConnectionIOExceptionpublic HTableDescriptor[] getHTableDescriptors(List<String> tableNames) throws IOException
getHTableDescriptors in interface HConnectionIOExceptionpublic boolean isClosed()
isClosed in interface HConnectionpublic void clearCaches(ServerName sn)
clearCaches in interface HConnectionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void deleteCachedRegionLocation(HRegionLocation location)
deleteCachedRegionLocation in interface HConnectionpublic org.apache.hadoop.hbase.client.MasterKeepAliveConnection getKeepAliveMasterService() throws MasterNotRunningException
getKeepAliveMasterService in interface HConnectionMasterNotRunningExceptionpublic boolean isDeadServer(ServerName serverName)
isDeadServer in interface HConnectionCopyright © 2014 The Apache Software Foundation. All Rights Reserved.