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,
AtomicReference<Map<String,String>> nodeToHost) |
Modifier and Type | Method and Description |
---|---|
String |
getAssignmentId() |
String |
getCodeDir()
Gets the location of the external resources for this worker on the local filesystem.
|
AtomicReference<Map<String,String>> |
getNodeToHost()
Get a map from nodeId to hostname.
|
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.
|
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, AtomicReference<Map<String,String>> nodeToHost)
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()
public Integer getThisWorkerPort()
public String getAssignmentId()
public AtomicReference<Map<Integer,NodeInfo>> getTaskToNodePort()
public AtomicReference<Map<String,String>> getNodeToHost()
public String getCodeDir()
public String getPIDDir()
public ExecutorService getSharedExecutor()
Copyright © 2023 The Apache Software Foundation. All rights reserved.