public class WorkerTopologyContext extends GeneralTopologyContext
Modifier and Type | Field and Description |
---|---|
static String |
SHARED_EXECUTOR |
doSanityCheck, topoConf
Constructor and Description |
---|
WorkerTopologyContext(StormTopology topology,
Map<String,Object> topoConf,
Map<Integer,String> taskToComponent,
Map<String,List<Integer>> componentToSortedTasks,
Map<String,Map<String,Fields>> componentToStreamToFields,
String stormId,
String codeDir,
String pidDir,
Integer workerPort,
List<Integer> workerTasks,
Map<String,Object> defaultResources,
Map<String,Object> userResources) |
WorkerTopologyContext(StormTopology topology,
Map<String,Object> topoConf,
Map<Integer,String> taskToComponent,
Map<String,List<Integer>> componentToSortedTasks,
Map<String,Map<String,Fields>> componentToStreamToFields,
String stormId,
String codeDir,
String pidDir,
Integer workerPort,
List<Integer> workerTasks,
Map<String,Object> defaultResources,
Map<String,Object> userResources,
AtomicReference<Map<Integer,NodeInfo>> taskToNodePort,
String assignmentId) |
Modifier and Type | Method and Description |
---|---|
String |
getCodeDir()
Gets the location of the external resources for this worker on the local filesystem.
|
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.
|
Object |
getResource(String name) |
ExecutorService |
getSharedExecutor() |
AtomicReference<Map<Integer,NodeInfo>> |
getTaskToNodePort()
Get a map from task Id to NodePort.
|
String |
getThisWorkerHost() |
Integer |
getThisWorkerPort() |
List<Integer> |
getThisWorkerTasks()
Gets all the task ids that are running in this worker process (including the task for this task).
|
doSanityCheck, getComponentCommon, getComponentId, getComponentIds, getComponentOutputFields, getComponentOutputFields, getComponentStreams, getComponentTasks, getConf, getRawTopology, getSources, getStormId, getTargets, getTaskToComponent, maxTopologyMessageTimeout, toJSONString
public static final String SHARED_EXECUTOR
public WorkerTopologyContext(StormTopology topology, Map<String,Object> topoConf, Map<Integer,String> taskToComponent, Map<String,List<Integer>> componentToSortedTasks, Map<String,Map<String,Fields>> componentToStreamToFields, String stormId, String codeDir, String pidDir, Integer workerPort, List<Integer> workerTasks, Map<String,Object> defaultResources, Map<String,Object> userResources, AtomicReference<Map<Integer,NodeInfo>> taskToNodePort, String assignmentId)
public WorkerTopologyContext(StormTopology topology, Map<String,Object> topoConf, Map<Integer,String> taskToComponent, Map<String,List<Integer>> componentToSortedTasks, Map<String,Map<String,Fields>> componentToStreamToFields, String stormId, String codeDir, String pidDir, Integer workerPort, List<Integer> workerTasks, Map<String,Object> defaultResources, Map<String,Object> userResources)
public List<Integer> getThisWorkerTasks()
Gets all the task ids that are running in this worker process (including the task for this task).
public Integer getThisWorkerPort()
public String getThisWorkerHost()
public AtomicReference<Map<Integer,NodeInfo>> getTaskToNodePort()
Get a map from task Id to NodePort.
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.
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.
public ExecutorService getSharedExecutor()
Copyright © 2019 The Apache Software Foundation. All rights reserved.