Class SupervisorClient

java.lang.Object
org.apache.storm.security.auth.ThriftClient
org.apache.storm.utils.SupervisorClient
All Implemented Interfaces:
Closeable, AutoCloseable, SupervisorIfaceFactory

public class SupervisorClient extends ThriftClient implements SupervisorIfaceFactory
Client for interacting with Supervisor server, now we use supervisor server mainly for cases below.
  • worker <- supervisor: get worker local assignment for a storm.
  • nimbus -> supervisor: assign assignments for a node.
  • Constructor Details

    • SupervisorClient

      @Deprecated public SupervisorClient(Map conf, String host, int port) throws org.apache.storm.thrift.transport.TTransportException
      Deprecated.
      use #build() instead.
      Constructor.
      Parameters:
      conf - the conf for the client.
      host - the host the client is to talk to.
      port - the port for the client.
      Throws:
      org.apache.storm.thrift.transport.TTransportException - on any error.
    • SupervisorClient

      @Deprecated public SupervisorClient(Map conf, String host, int port, Integer timeout) throws org.apache.storm.thrift.transport.TTransportException
      Deprecated.
      use #build() instead.
      Constructor.
      Parameters:
      conf - the conf for the client.
      host - the host the client is to talk to.
      port - the port for the client.
      timeout - the timeout for the client.
      Throws:
      org.apache.storm.thrift.transport.TTransportException - on any error.
    • SupervisorClient

      @Deprecated public SupervisorClient(Map conf, String host, Integer port, Integer timeout, String asUser) throws org.apache.storm.thrift.transport.TTransportException
      Deprecated.
      use #build() instead.
      Constructor.
      Parameters:
      conf - the conf for the client.
      host - the host the client is to talk to.
      port - the port for the client.
      timeout - the timeout for the client.
      asUser - the asUser for the client.
      Throws:
      org.apache.storm.thrift.transport.TTransportException - on any error.
    • SupervisorClient

      @Deprecated public SupervisorClient(Map conf, String host) throws org.apache.storm.thrift.transport.TTransportException
      Deprecated.
      use #build() instead.
      Constructor.
      Parameters:
      conf - the conf for the client.
      host - the host the client is to talk to.
      Throws:
      org.apache.storm.thrift.transport.TTransportException - on any error.
  • Method Details

    • getConfiguredClient

      @Deprecated public static SupervisorClient getConfiguredClient(Map conf, String host)
      Deprecated.
      Get a supervisor client as configured by conf.
      Parameters:
      conf - the configuration to use.
      host - the host to use.
      Returns:
      the client, don't forget to close it when done.
    • getConfiguredClient

      @Deprecated public static SupervisorClient getConfiguredClient(Map conf, String host, int port)
      Deprecated.
      Get a supervisor client as configured by conf.
      Parameters:
      conf - the configuration to use.
      host - the host to use.
      port - the port to use.
      Returns:
      the client, don't forget to close it when done.
    • getConfiguredClientAs

      @Deprecated public static SupervisorClient getConfiguredClientAs(Map conf, String host, int port, String asUser)
      Deprecated.
      Get a supervisor client as configured by conf.
      Parameters:
      conf - the configuration to use.
      host - the host to use.
      port - the port to use.
      asUser - the asUser.
      Returns:
      the client, don't forget to close it when done.
    • getIface

      public Supervisor.Client getIface()
      Specified by:
      getIface in interface SupervisorIfaceFactory