Package org.apache.hadoop.hbase.ipc
Class RpcClientFactory
java.lang.Object
org.apache.hadoop.hbase.ipc.RpcClientFactory
Factory to create a
RpcClient
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RpcClient
createClient
(org.apache.hadoop.conf.Configuration conf, String clusterId) Helper method for tests only.static RpcClient
createClient
(org.apache.hadoop.conf.Configuration conf, String clusterId, SocketAddress localAddr, MetricsConnection metrics, Map<String, byte[]> connectionAttributes) Creates a new RpcClient by the class defined in the configuration or falls back to RpcClientImplstatic RpcClient
createClient
(org.apache.hadoop.conf.Configuration conf, String clusterId, MetricsConnection metrics) Creates a new RpcClient by the class defined in the configuration or falls back to RpcClientImplstatic RpcClient
createClient
(org.apache.hadoop.conf.Configuration conf, String clusterId, MetricsConnection metrics, Map<String, byte[]> connectionAttributes) Creates a new RpcClient by the class defined in the configuration or falls back to RpcClientImplprivate static String
getRpcClientClass
(org.apache.hadoop.conf.Configuration conf)
-
Field Details
-
CUSTOM_RPC_CLIENT_IMPL_CONF_KEY
- See Also:
-
DEPRECATED_NAME_MAPPING
private static final org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<String,String> DEPRECATED_NAME_MAPPING
-
-
Constructor Details
-
RpcClientFactory
private RpcClientFactory()Private Constructor
-
-
Method Details
-
createClient
Helper method for tests only. Creates anRpcClient
without metrics. -
createClient
public static RpcClient createClient(org.apache.hadoop.conf.Configuration conf, String clusterId, MetricsConnection metrics) Creates a new RpcClient by the class defined in the configuration or falls back to RpcClientImpl- Parameters:
conf
- configurationclusterId
- the cluster idmetrics
- the connection metrics- Returns:
- newly created RpcClient
-
getRpcClientClass
-
createClient
public static RpcClient createClient(org.apache.hadoop.conf.Configuration conf, String clusterId, MetricsConnection metrics, Map<String, byte[]> connectionAttributes) Creates a new RpcClient by the class defined in the configuration or falls back to RpcClientImpl- Parameters:
conf
- configurationclusterId
- the cluster idmetrics
- the connection metricsconnectionAttributes
- attributes to be sent along to server during connection establish- Returns:
- newly created RpcClient
-
createClient
public static RpcClient createClient(org.apache.hadoop.conf.Configuration conf, String clusterId, SocketAddress localAddr, MetricsConnection metrics, Map<String, byte[]> connectionAttributes) Creates a new RpcClient by the class defined in the configuration or falls back to RpcClientImpl- Parameters:
conf
- configurationclusterId
- the cluster idlocalAddr
- client socket bind address.metrics
- the connection metricsconnectionAttributes
- attributes to be sent along to server during connection establish- Returns:
- newly created RpcClient
-