Class RpcClientFactory

java.lang.Object
org.apache.hadoop.hbase.ipc.RpcClientFactory

@Private public final class RpcClientFactory extends Object
Factory to create a RpcClient
  • Field Details

  • Constructor Details

  • Method Details

    • createClient

      public static RpcClient createClient(org.apache.hadoop.conf.Configuration conf, String clusterId)
      Helper method for tests only. Creates an RpcClient 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 - configuration
      clusterId - the cluster id
      metrics - the connection metrics
      Returns:
      newly created RpcClient
    • getRpcClientClass

      private static String getRpcClientClass(org.apache.hadoop.conf.Configuration conf)
    • 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 - configuration
      clusterId - the cluster id
      metrics - the connection metrics
      connectionAttributes - 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 - configuration
      clusterId - the cluster id
      localAddr - client socket bind address.
      metrics - the connection metrics
      connectionAttributes - attributes to be sent along to server during connection establish
      Returns:
      newly created RpcClient