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 Details

    • 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 configuration
      context - -
      topologyId - - topology id
      assignmentId - - assignment id
      supervisorPort - - parent supervisor thrift server port
      port - - port on which the worker runs
      workerId - - 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

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • start

      public void start() throws Exception
      Throws:
      Exception
    • 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:
      shutdown in interface Shutdownable
    • isWaiting

      public boolean isWaiting()
      Specified by:
      isWaiting in interface DaemonCommon