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 and 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 and Description
    --- | ---
    `void` | `checkCredentialsChanged()`
    `void` | `checkLogConfigChanged()`
    `void` | `doExecutorHeartbeats()`
    `void` | `doHeartBeat()`
    `void` | `doRefreshLoad()`
    `void` | `establishLogSettingCallback()`
    `Map<String,Long>` | `getCurrentBlobVersions()`
    `boolean` | `isWaiting()`
    `static void` | `main(String[] args)`
    `void` | `shutdown()`
    `void` | `start()`
    `void` | `updateBlobUpdates()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 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 Detail

    - #### 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`

Copyright © 2021 The Apache Software Foundation. All rights reserved.