Class Supervisor
java.lang.Object
org.apache.storm.daemon.supervisor.Supervisor
- All Implemented Interfaces:
- AutoCloseable,- DaemonCommon
- 
Constructor SummaryConstructorsConstructorDescriptionSupervisor(Map<String, Object> conf, IContext sharedContext, ISupervisor iSupervisor, StormMetricsRegistry metricsRegistry) Constructor for supervisor daemon.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheckAuthorization(String operation) voidvoidcheckAuthorization(String topoName, Map<String, Object> topoConf, String operation, ReqContext context) voidclose()getConf()Get the executor service that is supposed to be used for heart-beats.getId()intbooleanvoidlaunch()Launch the supervisor.voidstart distribute supervisor.static voidsupervisor daemon enter entrance.voidsendSupervisorAssignments(SupervisorAssignments assignments) Used for local cluster assignments distribution.voidsetLocalNimbus(Nimbus.Iface nimbus) voidshutdownAllWorkers(BiConsumer<Slot, Long> onWarnTimeout, UniFunc<Slot> onErrorTimeout) 
- 
Constructor Details- 
Supervisorpublic Supervisor(Map<String, Object> conf, IContext sharedContext, ISupervisor iSupervisor, StormMetricsRegistry metricsRegistry) throws IOException, IllegalAccessException, ClassNotFoundException, InstantiationExceptionConstructor for supervisor daemon.- Parameters:
- conf- config
- sharedContext-- IContext
- iSupervisor-- ISupervisor
- Throws:
- IOException
- IllegalAccessException
- ClassNotFoundException
- InstantiationException
 
 
- 
- 
Method Details- 
mainsupervisor daemon enter entrance.- Throws:
- Exception
 
- 
getHeartbeatExecutorGet the executor service that is supposed to be used for heart-beats.
- 
getId
- 
getMetricsRegistry
- 
getConf
- 
getiSupervisor
- 
getUpTime
- 
getStormVersion
- 
getStormClusterState
- 
getReadClusterState
- 
getAssignmentId
- 
getThriftServerPortpublic int getThriftServerPort()
- 
getHostName
- 
getCurrAssignment
- 
getLocalNimbus
- 
setLocalNimbus
- 
launchLaunch the supervisor.- Throws:
- Exception
 
- 
launchDaemonpublic void launchDaemon()start distribute supervisor.
- 
checkAuthorization- Throws:
- AuthorizationException
 
- 
checkAuthorizationpublic void checkAuthorization(String topoName, Map<String, Object> topoConf, String operation) throws AuthorizationException- Throws:
- AuthorizationException
 
- 
checkAuthorizationpublic void checkAuthorization(String topoName, Map<String, Object> topoConf, String operation, ReqContext context) throws AuthorizationException- Throws:
- AuthorizationException
 
- 
getSupervisorThriftInterface
- 
sendSupervisorAssignmentsUsed for local cluster assignments distribution.- Parameters:
- assignments-- SupervisorAssignments
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
 
- 
shutdownAllWorkers
- 
isWaitingpublic boolean isWaiting()- Specified by:
- isWaitingin interface- DaemonCommon
 
 
-