org.apache.storm.utils

## 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.

- - ### Field Summary

    - ### Fields inherited from class org.apache.storm.security.auth.ThriftClient

      `protocol, retryForever`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SupervisorClient(Map conf, String host)`
    `SupervisorClient(Map conf, String host, int port)`
    `SupervisorClient(Map conf, String host, Integer port, Integer timeout, String asUser)`
    `SupervisorClient(Map conf, String host, int port, Integer timeout)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SupervisorClient` | `getConfiguredClient(Map conf, String host)`
    `static SupervisorClient` | `getConfiguredClient(Map conf, String host, int port)`
    `static SupervisorClient` | `getConfiguredClientAs(Map conf, String host, int port, String asUser)`
    `Supervisor.Client` | `getIface()`

    - ### Methods inherited from class org.apache.storm.security.auth.ThriftClient

      `close, reconnect, transport`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.storm.utils.SupervisorIfaceFactory

      `close`

- - ### Constructor Detail

    - #### SupervisorClient

          public SupervisorClient(Map conf,
                                  String host,
                                  int port)
                           throws org.apache.storm.thrift.transport.TTransportException

      Throws:
        `org.apache.storm.thrift.transport.TTransportException`

    - #### SupervisorClient

          public SupervisorClient(Map conf,
                                  String host,
                                  int port,
                                  Integer timeout)
                           throws org.apache.storm.thrift.transport.TTransportException

      Throws:
        `org.apache.storm.thrift.transport.TTransportException`

    - #### SupervisorClient

          public SupervisorClient(Map conf,
                                  String host,
                                  Integer port,
                                  Integer timeout,
                                  String asUser)
                           throws org.apache.storm.thrift.transport.TTransportException

      Throws:
        `org.apache.storm.thrift.transport.TTransportException`

    - #### SupervisorClient

          public SupervisorClient(Map conf,
                                  String host)
                           throws org.apache.storm.thrift.transport.TTransportException

      Throws:
        `org.apache.storm.thrift.transport.TTransportException`

  - ### Method Detail

    - #### getConfiguredClient

          public static SupervisorClient getConfiguredClient(Map conf,
                                                             String host)

    - #### getConfiguredClient

          public static SupervisorClient getConfiguredClient(Map conf,
                                                             String host,
                                                             int port)

    - #### getConfiguredClientAs

          public static SupervisorClient getConfiguredClientAs(Map conf,
                                                               String host,
                                                               int port,
                                                               String asUser)

    - #### getIface

          public Supervisor.Client getIface()

      Specified by:
        `getIface` in interface `SupervisorIfaceFactory`

Copyright © 2021 The Apache Software Foundation. All rights reserved.