Package org.apache.hadoop.hbase.client
Class ServerConnectionUtils
java.lang.Object
org.apache.hadoop.hbase.client.ServerConnectionUtils
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A ClusterConnection that will short-circuit RPC making direct invocations against the localhost if the invocation target is 'this' server; save on network and protobuf invocations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterConnection
createShortCircuitConnection
(org.apache.hadoop.conf.Configuration conf, User user, ServerName serverName, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface client, ConnectionRegistry registry) Creates a short-circuit connection that can bypass the RPC layer (serialization, deserialization, networking, etc..) when talking to a local server.
-
Constructor Details
-
ServerConnectionUtils
private ServerConnectionUtils()
-
-
Method Details
-
createShortCircuitConnection
public static ClusterConnection createShortCircuitConnection(org.apache.hadoop.conf.Configuration conf, User user, ServerName serverName, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface client, ConnectionRegistry registry) throws IOException Creates a short-circuit connection that can bypass the RPC layer (serialization, deserialization, networking, etc..) when talking to a local server.- Parameters:
conf
- the current configurationuser
- the user the connection is forserverName
- the local server nameadmin
- the admin interface of the local serverclient
- the client interface of the local serverregistry
- the connection registry to be used, can be null- Returns:
- an short-circuit connection.
- Throws:
IOException
- if IO failure occurred
-