public class Supervisor extends Object implements DaemonCommon, AutoCloseable
Constructor and Description |
---|
Supervisor(Map<String,Object> conf,
IContext sharedContext,
ISupervisor iSupervisor,
StormMetricsRegistry metricsRegistry)
Constructor for supervisor daemon.
|
public Supervisor(Map<String,Object> conf, IContext sharedContext, ISupervisor iSupervisor, StormMetricsRegistry metricsRegistry) throws IOException, IllegalAccessException, ClassNotFoundException, InstantiationException
conf
- configsharedContext
- IContext
iSupervisor
- ISupervisor
IOException
IllegalAccessException
ClassNotFoundException
InstantiationException
public static void main(String[] args) throws Exception
Exception
public ExecutorService getHeartbeatExecutor()
public String getId()
public StormMetricsRegistry getMetricsRegistry()
public ISupervisor getiSupervisor()
public Utils.UptimeComputer getUpTime()
public String getStormVersion()
public IStormClusterState getStormClusterState()
public ReadClusterState getReadClusterState()
public String getAssignmentId()
public int getThriftServerPort()
public String getHostName()
public AtomicReference<Map<Long,LocalAssignment>> getCurrAssignment()
public Nimbus.Iface getLocalNimbus()
public void setLocalNimbus(Nimbus.Iface nimbus)
public void launchDaemon()
public void checkAuthorization(String operation) throws AuthorizationException
AuthorizationException
public void checkAuthorization(String topoName, Map<String,Object> topoConf, String operation) throws AuthorizationException
AuthorizationException
public void checkAuthorization(String topoName, Map<String,Object> topoConf, String operation, ReqContext context) throws AuthorizationException
AuthorizationException
public Supervisor.Iface getSupervisorThriftInterface()
public void sendSupervisorAssignments(SupervisorAssignments assignments)
assignments
- SupervisorAssignments
public void close()
close
in interface AutoCloseable
public void shutdownAllWorkers(BiConsumer<Slot,Long> onWarnTimeout, UniFunc<Slot> onErrorTimeout)
public boolean isWaiting()
isWaiting
in interface DaemonCommon
Copyright © 2023 The Apache Software Foundation. All rights reserved.