Package 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
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.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from class org.apache.storm.security.auth.ThriftClientprotocol, retryForever
- 
Constructor SummaryConstructorsConstructorDescriptionSupervisorClient(Map conf, String host) Deprecated.SupervisorClient(Map conf, String host, int port) Deprecated.use#build()instead.SupervisorClient(Map conf, String host, int port, Integer timeout) Deprecated.use#build()instead.Deprecated.use#build()instead.
- 
Method SummaryModifier and TypeMethodDescriptionstatic SupervisorClientgetConfiguredClient(Map conf, String host) Deprecated.use#createSupervisorClient()instead.static SupervisorClientgetConfiguredClient(Map conf, String host, int port) Deprecated.use#createSupervisorClient()instead.static SupervisorClientgetConfiguredClientAs(Map conf, String host, int port, String asUser) Deprecated.use#createSupervisorClient()instead.getIface()Methods inherited from class org.apache.storm.security.auth.ThriftClientclose, getKeyStoreFile, getPrivateKey, reconnect, transportMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.utils.SupervisorIfaceFactoryclose
- 
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- 
getConfiguredClientDeprecated.use#createSupervisorClient()instead.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.
 
- 
getConfiguredClientDeprecated.use#createSupervisorClient()instead.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.use#createSupervisorClient()instead.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- Specified by:
- getIfacein interface- SupervisorIfaceFactory
 
 
- 
#build()instead.