Class DRPCClient

All Implemented Interfaces:
AutoCloseable, DistributedRPC.Iface

public class DRPCClient extends ThriftClient implements DistributedRPC.Iface
  • 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

      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 interface DistributedRPC.Iface
      Throws:
      org.apache.storm.thrift.TException
      DRPCExecutionException
      AuthorizationException
    • getClient

      public DistributedRPC.Iface getClient()