Package org.apache.hadoop.hbase.ipc
Class BlockingRpcClient
java.lang.Object
org.apache.hadoop.hbase.ipc.AbstractRpcClient<BlockingRpcConnection>
org.apache.hadoop.hbase.ipc.BlockingRpcClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RpcClient
Does RPC against a cluster. Manages connections per regionserver in the cluster.
See HBaseServer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.ipc.AbstractRpcClient
AbstractRpcClient.BlockingRpcChannelImplementation, AbstractRpcClient.RpcChannelImplementation
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.ipc.AbstractRpcClient
cellBlockBuilder, clusterId, codec, compressor, conf, connectionAttributes, connectTO, failedServers, failureSleep, fallbackAllowed, localAddr, LOG, maxRetries, metrics, minIdleTimeBeforeClose, readTO, tcpKeepAlive, tcpNoDelay, userProvider, WHEEL_TIMER, writeTO
Fields inherited from interface org.apache.hadoop.hbase.ipc.RpcClient
DEFAULT_CODEC_CLASS, DEFAULT_SOCKET_TIMEOUT_CONNECT, DEFAULT_SOCKET_TIMEOUT_READ, DEFAULT_SOCKET_TIMEOUT_WRITE, FAILED_SERVER_EXPIRY_DEFAULT, FAILED_SERVER_EXPIRY_KEY, IDLE_TIME, IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_DEFAULT, IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY, PING_CALL_ID, REGISTRY_PREAMBLE_HEADER, SECURITY_PREAMBLE_HEADER, SOCKET_TIMEOUT_CONNECT, SOCKET_TIMEOUT_READ, SOCKET_TIMEOUT_WRITE, SPECIFIC_WRITE_THREAD
-
Constructor Summary
ConstructorDescriptionBlockingRpcClient
(org.apache.hadoop.conf.Configuration conf) Used in test only.BlockingRpcClient
(org.apache.hadoop.conf.Configuration conf, String clusterId, SocketAddress localAddr, MetricsConnection metrics, Map<String, byte[]> connectionAttributes) Construct an IPC client for the clusterclusterId
with the default SocketFactory This method is called with reflection by the RpcClientFactory to create an instance -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected BlockingRpcConnection
createConnection
(ConnectionId remoteId) Creates a connection.Methods inherited from class org.apache.hadoop.hbase.ipc.AbstractRpcClient
cancelConnections, close, configureHBaseRpcController, createAddr, createBlockingRpcChannel, createRpcChannel, getCodec, getConnections, getDefaultCodec, hasCellBlockSupport, isTcpNoDelay
-
Field Details
-
socketFactory
-
-
Constructor Details
-
BlockingRpcClient
BlockingRpcClient(org.apache.hadoop.conf.Configuration conf) Used in test only. Construct an IPC client for the clusterclusterId
with the default SocketFactory -
BlockingRpcClient
public BlockingRpcClient(org.apache.hadoop.conf.Configuration conf, String clusterId, SocketAddress localAddr, MetricsConnection metrics, Map<String, byte[]> connectionAttributes) Construct an IPC client for the clusterclusterId
with the default SocketFactory This method is called with reflection by the RpcClientFactory to create an instance- Parameters:
conf
- configurationclusterId
- the cluster idlocalAddr
- client socket bind address.metrics
- the connection metrics
-
-
Method Details
-
createConnection
Creates a connection. Can be overridden by a subclass for testing.- Specified by:
createConnection
in classAbstractRpcClient<BlockingRpcConnection>
- Parameters:
remoteId
- - the ConnectionId to use for the connection creation.- Throws:
IOException
-
closeInternal
- Specified by:
closeInternal
in classAbstractRpcClient<BlockingRpcConnection>
-