Package org.apache.storm.daemon.worker
Class Worker
java.lang.Object
org.apache.storm.daemon.worker.Worker
- All Implemented Interfaces:
DaemonCommon
,Shutdownable
-
Constructor Summary
ConstructorDescriptionWorker
(Map<String, Object> conf, IContext context, String topologyId, String assignmentId, int supervisorPort, int port, String workerId) Worker
(Map<String, Object> conf, IContext context, String topologyId, String assignmentId, int supervisorPort, int port, String workerId, Supplier<SupervisorIfaceFactory> supervisorIfaceSupplier) TODO: should worker even take the topologyId as input? -
Method Summary
-
Constructor Details
-
Worker
public Worker(Map<String, Object> conf, IContext context, String topologyId, String assignmentId, int supervisorPort, int port, String workerId, Supplier<SupervisorIfaceFactory> supervisorIfaceSupplier) throws IOExceptionTODO: should worker even take the topologyId as input? this should be deducible from cluster state (by searching through assignments) what about if there's inconsistency in assignments? -> but nimbus should guarantee this consistency.- Parameters:
conf
- - Storm configurationcontext
- -topologyId
- - topology idassignmentId
- - assignment idsupervisorPort
- - parent supervisor thrift server portport
- - port on which the worker runsworkerId
- - worker id- Throws:
IOException
-
Worker
public Worker(Map<String, Object> conf, IContext context, String topologyId, String assignmentId, int supervisorPort, int port, String workerId) throws IOException- Throws:
IOException
-
-
Method Details
-
main
- Throws:
Exception
-
start
- Throws:
Exception
-
doRefreshLoad
public void doRefreshLoad() -
doHeartBeat
- Throws:
IOException
-
doExecutorHeartbeats
public void doExecutorHeartbeats() -
getCurrentBlobVersions
- Throws:
IOException
-
updateBlobUpdates
- Throws:
IOException
-
checkCredentialsChanged
public void checkCredentialsChanged() -
checkLogConfigChanged
public void checkLogConfigChanged() -
establishLogSettingCallback
public void establishLogSettingCallback() -
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceShutdownable
-
isWaiting
public boolean isWaiting()- Specified by:
isWaiting
in interfaceDaemonCommon
-