Package org.apache.storm.utils
Class DRPCClient
java.lang.Object
org.apache.storm.security.auth.ThriftClient
org.apache.storm.utils.DRPCClient
- All Implemented Interfaces:
AutoCloseable
,DistributedRPC.Iface
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.storm.security.auth.ThriftClient
protocol, retryForever
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DRPCClient
getConfiguredClient
(Map<String, Object> conf) getHost()
static String
Get override service ID.int
getPort()
static boolean
Check local override.Methods inherited from class org.apache.storm.security.auth.ThriftClient
close, reconnect, transport
-
Constructor Details
-
DRPCClient
public DRPCClient(Map<String, Object> conf, String host, int port) throws org.apache.storm.thrift.transport.TTransportException- Throws:
org.apache.storm.thrift.transport.TTransportException
-
DRPCClient
public DRPCClient(Map<String, Object> conf, String host, int port, Integer timeout) throws org.apache.storm.thrift.transport.TTransportException- Throws:
org.apache.storm.thrift.transport.TTransportException
-
-
Method Details
-
isLocalOverride
public static boolean isLocalOverride()Check local override.- Returns:
- true of new clients will be overridden to connect to a local cluster and not the configured remote cluster
-
getOverrideServiceId
Get override service ID.- Returns:
- the service ID of the local override DRPC instance
-
getConfiguredClient
public static DRPCClient getConfiguredClient(Map<String, Object> conf) throws org.apache.storm.thrift.transport.TTransportException- Throws:
org.apache.storm.thrift.transport.TTransportException
-
getHost
-
getPort
public int getPort() -
execute
public String execute(String func, String args) throws org.apache.storm.thrift.TException, DRPCExecutionException, AuthorizationException - Specified by:
execute
in interfaceDistributedRPC.Iface
- Throws:
org.apache.storm.thrift.TException
DRPCExecutionException
AuthorizationException
-
getClient
-