Package org.apache.hadoop.hbase.ipc
Interface RpcClient
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
AbstractRpcClient
,BlockingRpcClient
,NettyRpcClient
Interface for RpcClient implementations so ConnectionManager can handle it.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final int
static final int
static final int
static final int
static final String
static final String
static final boolean
static final String
static final int
static final byte[]
static final byte[]
static final String
static final String
How long we wait when we wait for an answer.static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Interrupt the connections to the given server.void
close()
Stop all threads related to this client.org.apache.hbase.thirdparty.com.google.protobuf.BlockingRpcChannel
createBlockingRpcChannel
(ServerName sn, User user, int rpcTimeout) Creates a "channel" that can be used by a blocking protobuf service.org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel
createRpcChannel
(ServerName sn, User user, int rpcTimeout) Creates a "channel" that can be used by a protobuf service.boolean
Return true when this client uses aCodec
and so supports cell blocks.
-
Field Details
-
FAILED_SERVER_EXPIRY_KEY
- See Also:
-
FAILED_SERVER_EXPIRY_DEFAULT
- See Also:
-
IDLE_TIME
- See Also:
-
IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY
- See Also:
-
IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_DEFAULT
- See Also:
-
SPECIFIC_WRITE_THREAD
- See Also:
-
DEFAULT_CODEC_CLASS
- See Also:
-
SOCKET_TIMEOUT_CONNECT
- See Also:
-
SOCKET_TIMEOUT_READ
How long we wait when we wait for an answer. It's not the operation time, it's the time we wait when we start to receive an answer, when the remote write starts to send the data.- See Also:
-
SOCKET_TIMEOUT_WRITE
- See Also:
-
DEFAULT_SOCKET_TIMEOUT_CONNECT
- See Also:
-
DEFAULT_SOCKET_TIMEOUT_READ
- See Also:
-
DEFAULT_SOCKET_TIMEOUT_WRITE
- See Also:
-
PING_CALL_ID
- See Also:
-
REGISTRY_PREAMBLE_HEADER
-
SECURITY_PREAMBLE_HEADER
-
-
Method Details
-
createBlockingRpcChannel
org.apache.hbase.thirdparty.com.google.protobuf.BlockingRpcChannel createBlockingRpcChannel(ServerName sn, User user, int rpcTimeout) Creates a "channel" that can be used by a blocking protobuf service. Useful setting up protobuf blocking stubs.- Parameters:
sn
- server name describing location of serveruser
- which is to use the connectionrpcTimeout
- default rpc operation timeout- Returns:
- A blocking rpc channel that goes via this rpc client instance.
-
createRpcChannel
org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel createRpcChannel(ServerName sn, User user, int rpcTimeout) Creates a "channel" that can be used by a protobuf service. Useful setting up protobuf stubs.- Parameters:
sn
- server name describing location of serveruser
- which is to use the connectionrpcTimeout
- default rpc operation timeout- Returns:
- A rpc channel that goes via this rpc client instance.
-
cancelConnections
Interrupt the connections to the given server. This should be called if the server is known as actually dead. This will not prevent current operation to be retried, and, depending on their own behavior, they may retry on the same server. This can be a feature, for example at startup. In any case, they're likely to get connection refused (if the process died) or no route to host: i.e. their next retries should be faster and with a safe exception.- Parameters:
sn
- server location to cancel connections of
-
close
void close()Stop all threads related to this client. No further calls may be made using this client.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
hasCellBlockSupport
boolean hasCellBlockSupport()Return true when this client uses aCodec
and so supports cell blocks.
-