Package org.apache.storm.drpc
Class DRPCInvocationsClient
- java.lang.Object
-
- org.apache.storm.security.auth.ThriftClient
-
- org.apache.storm.drpc.DRPCInvocationsClient
-
- All Implemented Interfaces:
AutoCloseable,DistributedRPCInvocations.Iface
public class DRPCInvocationsClient extends ThriftClient implements DistributedRPCInvocations.Iface
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOG-
Fields inherited from class org.apache.storm.security.auth.ThriftClient
protocol, retryForever
-
-
Constructor Summary
Constructors Constructor Description DRPCInvocationsClient(Map<String,Object> conf, String host, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfailRequest(String id)voidfailRequestV2(String id, DRPCExecutionException ex)DRPCRequestfetchRequest(String func)DistributedRPCInvocations.ClientgetClient()StringgetHost()intgetPort()booleanisConnected()voidreconnectClient()voidresult(String id, String result)-
Methods inherited from class org.apache.storm.security.auth.ThriftClient
close, getKeyStoreFile, getPrivateKey, reconnect, transport
-
-
-
-
Method Detail
-
getHost
public String getHost()
-
getPort
public int getPort()
-
reconnectClient
public void reconnectClient() throws org.apache.storm.thrift.TException- Throws:
org.apache.storm.thrift.TException
-
isConnected
public boolean isConnected()
-
result
public void result(String id, String result) throws org.apache.storm.thrift.TException, AuthorizationException
- Specified by:
resultin interfaceDistributedRPCInvocations.Iface- Throws:
org.apache.storm.thrift.TExceptionAuthorizationException
-
fetchRequest
public DRPCRequest fetchRequest(String func) throws org.apache.storm.thrift.TException, AuthorizationException
- Specified by:
fetchRequestin interfaceDistributedRPCInvocations.Iface- Throws:
org.apache.storm.thrift.TExceptionAuthorizationException
-
failRequest
public void failRequest(String id) throws org.apache.storm.thrift.TException, AuthorizationException
- Specified by:
failRequestin interfaceDistributedRPCInvocations.Iface- Throws:
org.apache.storm.thrift.TExceptionAuthorizationException
-
getClient
public DistributedRPCInvocations.Client getClient()
-
failRequestV2
public void failRequestV2(String id, DRPCExecutionException ex) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
failRequestV2in interfaceDistributedRPCInvocations.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
-