Class WorkerTopologyContext

    • Method Detail

      • getThisWorkerTasks

        public List<Integer> getThisWorkerTasks()
        Gets all the task ids that are running in this worker process (including the task for this task). In Heron parlance, since every instance is running as a seperate process this will just return the current instance's taskId
      • getThisWorkerPort

        public Integer getThisWorkerPort()
        Return the port that the worker is running on. This was typically done to differentiate workers running on the same machine. In Heron parlance, we just return the taskId since that should be unique
      • getCodeDir

        public String getCodeDir()
        Gets the location of the external resources for this worker on the local filesystem. These external resources typically include bolts implemented in other languages, such as Ruby or Python.
      • getPIDDir

        public String getPIDDir()
        If this task spawns any subprocesses, those subprocesses must immediately write their PID to this directory on the local filesystem to ensure that Storm properly destroys that process when the worker is shutdown.