@InterfaceAudience.Private @InterfaceStability.Evolving public class CoprocessorHConnection extends Object
You should not use this class from any client - its an internal class meant for use by the coprocessor framework.
Modifier and Type | Field and Description |
---|---|
protected String |
clusterId |
static String |
RETRIES_BY_SERVER_KEY |
protected User |
user |
HBASE_CLIENT_CONNECTION_IMPL
Constructor and Description |
---|
CoprocessorHConnection(org.apache.hadoop.conf.Configuration conf,
HRegionServer server)
Constructor that accepts custom configuration
|
CoprocessorHConnection(HRegionServer server)
Constructor that uses server configuration
|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTable
public static final String RETRIES_BY_SERVER_KEY
protected User user
protected String clusterId
public CoprocessorHConnection(HRegionServer server) throws IOException
server
- IOException
- if we cannot create the connectionpublic CoprocessorHConnection(org.apache.hadoop.conf.Configuration conf, HRegionServer server) throws IOException
conf
- server
- IOException
- if we cannot create the connectionpublic static ClusterConnection getConnectionForEnvironment(CoprocessorEnvironment env) throws IOException
ClusterConnection
based on the environment in which we are running the
coprocessor. The ClusterConnection
must be externally cleaned up
(we bypass the usual HTable cleanup mechanisms since we own everything).env
- environment hosting the ClusterConnection
ClusterConnection
.IOException
- if we cannot create the connectionpublic org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface getClient(ServerName serverName) throws IOException
getClient
in interface ClusterConnection
IOException
public NonceGenerator getNonceGenerator()
getNonceGenerator
in interface ClusterConnection
public Table getTable(TableName arg0) throws IOException
getTable
in interface Connection
IOException
public TableBuilder getTableBuilder(TableName arg0, ExecutorService arg1)
getTableBuilder
in interface Connection
public BufferedMutator getBufferedMutator(BufferedMutatorParams arg0)
getBufferedMutator
in interface Connection
public BufferedMutator getBufferedMutator(TableName arg0)
getBufferedMutator
in interface Connection
public RegionLocator getRegionLocator(TableName arg0) throws IOException
getRegionLocator
in interface Connection
IOException
public Admin getAdmin() throws IOException
getAdmin
in interface Connection
IOException
public MetricsConnection getConnectionMetrics()
getConnectionMetrics
in interface ClusterConnection
protected ExecutorService getCurrentMetaLookupPool()
protected ExecutorService getCurrentBatchPool()
protected void retrieveClusterId()
public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration
in interface Connection
@Deprecated public boolean isMasterRunning() throws MasterNotRunningException, ZooKeeperConnectionException
isMasterRunning
in interface ClusterConnection
MasterNotRunningException
ZooKeeperConnectionException
public HRegionLocation getRegionLocation(TableName arg0, byte[] arg1, boolean arg2) throws IOException
getRegionLocation
in interface ClusterConnection
IOException
public boolean isTableEnabled(TableName arg0) throws IOException
isTableEnabled
in interface ClusterConnection
IOException
public boolean isTableDisabled(TableName arg0) throws IOException
isTableDisabled
in interface ClusterConnection
IOException
public boolean isTableAvailable(TableName arg0, @Nullable byte[][] arg1) throws IOException
isTableAvailable
in interface ClusterConnection
IOException
public HRegionLocation locateRegion(byte[] arg0) throws IOException
locateRegion
in interface ClusterConnection
IOException
public boolean isDeadServer(ServerName arg0)
isDeadServer
in interface ClusterConnection
public List<HRegionLocation> locateRegions(TableName arg0) throws IOException
locateRegions
in interface ClusterConnection
IOException
public List<HRegionLocation> locateRegions(TableName arg0, boolean arg1, boolean arg2) throws IOException
locateRegions
in interface ClusterConnection
IOException
public HRegionLocation locateRegion(TableName arg0, byte[] arg1) throws IOException
locateRegion
in interface ClusterConnection
IOException
public HRegionLocation relocateRegion(TableName arg0, byte[] arg1) throws IOException
relocateRegion
in interface ClusterConnection
IOException
public RegionLocations relocateRegion(TableName arg0, byte[] arg1, int arg2) throws IOException
relocateRegion
in interface ClusterConnection
IOException
public RegionLocations locateRegion(TableName arg0, byte[] arg1, boolean arg2, boolean arg3) throws IOException
locateRegion
in interface ClusterConnection
IOException
public RegionLocations locateRegion(TableName arg0, byte[] arg1, boolean arg2, boolean arg3, int arg4) throws IOException
locateRegion
in interface ClusterConnection
IOException
public void cacheLocation(TableName arg0, RegionLocations arg1)
cacheLocation
in interface ClusterConnection
public void clearRegionCache(TableName arg0, byte[] arg1)
public void clearCaches(ServerName arg0)
clearCaches
in interface ClusterConnection
public void clearRegionCache()
clearRegionCache
in interface ClusterConnection
public void clearRegionCache(TableName arg0)
clearRegionCache
in interface ClusterConnection
public org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface getAdmin(ServerName arg0) throws IOException
getAdmin
in interface ClusterConnection
IOException
public org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.BlockingInterface getMaster() throws MasterNotRunningException
getMaster
in interface ClusterConnection
MasterNotRunningException
public org.apache.hadoop.hbase.client.MasterKeepAliveConnection getKeepAliveMasterService() throws MasterNotRunningException
getKeepAliveMasterService
in interface ClusterConnection
MasterNotRunningException
public void deleteCachedRegionLocation(HRegionLocation arg0)
deleteCachedRegionLocation
in interface ClusterConnection
public void updateCachedLocations(TableName arg0, byte[] arg1, byte[] arg2, Object arg3, ServerName arg4)
updateCachedLocations
in interface ClusterConnection
public org.apache.hadoop.hbase.client.AsyncProcess getAsyncProcess()
getAsyncProcess
in interface ClusterConnection
public ServerStatisticTracker getStatisticsTracker()
getStatisticsTracker
in interface ClusterConnection
public ClientBackoffPolicy getBackoffPolicy()
getBackoffPolicy
in interface ClusterConnection
public boolean isClosed()
isClosed
in interface Connection
public int getCurrentNrHRS() throws IOException
getCurrentNrHRS
in interface ClusterConnection
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Connection
protected void finalize() throws Throwable
public TableState getTableState(TableName arg0) throws IOException
getTableState
in interface ClusterConnection
IOException
public RpcRetryingCallerFactory getNewRpcRetryingCallerFactory(org.apache.hadoop.conf.Configuration arg0)
getNewRpcRetryingCallerFactory
in interface ClusterConnection
public boolean hasCellBlockSupport()
hasCellBlockSupport
in interface ClusterConnection
public ConnectionConfiguration getConnectionConfiguration()
getConnectionConfiguration
in interface ClusterConnection
public RpcRetryingCallerFactory getRpcRetryingCallerFactory()
getRpcRetryingCallerFactory
in interface ClusterConnection
public RpcControllerFactory getRpcControllerFactory()
getRpcControllerFactory
in interface ClusterConnection
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.