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
public class DRPCClient extends ThriftClient implements DistributedRPC.Iface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DRPCClient.LocalOverride
-
Field Summary
-
Fields inherited from class org.apache.storm.security.auth.ThriftClient
protocol, retryForever
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
execute(String func, String args)
DistributedRPC.Iface
getClient()
static DRPCClient
getConfiguredClient(Map<String,Object> conf)
String
getHost()
static String
getOverrideServiceId()
Get override service ID.int
getPort()
static boolean
isLocalOverride()
Check local override.-
Methods inherited from class org.apache.storm.security.auth.ThriftClient
close, getKeyStoreFile, getPrivateKey, reconnect, transport
-
-
-
-
Method Detail
-
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
public static String 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
public String 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
public DistributedRPC.Iface getClient()
-
-