Package org.apache.storm.daemon.worker
Class Worker
- java.lang.Object
-
- org.apache.storm.daemon.worker.Worker
-
- All Implemented Interfaces:
DaemonCommon,Shutdownable
public class Worker extends Object implements Shutdownable, DaemonCommon
-
-
Constructor Summary
Constructors Constructor Description Worker(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? 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckCredentialsChanged()voidcheckLogConfigChanged()voiddoExecutorHeartbeats()voiddoHeartBeat()voiddoRefreshLoad()voidestablishLogSettingCallback()Map<String,Long>getCurrentBlobVersions()booleanisWaiting()static voidmain(String[] args)voidshutdown()voidstart()voidupdateBlobUpdates()
-
-
-
Constructor Detail
-
Worker
public Worker(Map<String,Object> conf, IContext context, String topologyId, String assignmentId, int supervisorPort, int port, String workerId, Supplier<SupervisorIfaceFactory> supervisorIfaceSupplier) throws IOException
TODO: 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 Detail
-
doRefreshLoad
public void doRefreshLoad()
-
doHeartBeat
public void doHeartBeat() throws IOException- Throws:
IOException
-
doExecutorHeartbeats
public void doExecutorHeartbeats()
-
getCurrentBlobVersions
public Map<String,Long> getCurrentBlobVersions() throws IOException
- Throws:
IOException
-
updateBlobUpdates
public void updateBlobUpdates() throws IOException- Throws:
IOException
-
checkCredentialsChanged
public void checkCredentialsChanged()
-
checkLogConfigChanged
public void checkLogConfigChanged()
-
establishLogSettingCallback
public void establishLogSettingCallback()
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceShutdownable
-
isWaiting
public boolean isWaiting()
- Specified by:
isWaitingin interfaceDaemonCommon
-
-