public class GeneralTopologyContext extends Object implements org.apache.storm.shade.org.json.simple.JSONAware
Modifier and Type | Field and Description |
---|---|
protected boolean |
doSanityCheck |
protected Map<String,Object> |
topoConf |
Constructor and Description |
---|
GeneralTopologyContext(StormTopology topology,
Map<String,Object> topoConf,
Map<Integer,String> taskToComponent,
Map<String,List<Integer>> componentToSortedTasks,
Map<String,Map<String,Fields>> componentToStreamToFields,
String stormId) |
Modifier and Type | Method and Description |
---|---|
boolean |
doSanityCheck() |
ComponentCommon |
getComponentCommon(String componentId) |
String |
getComponentId(int taskId)
Gets the component id for the specified task id.
|
Set<String> |
getComponentIds()
Gets a list of all component ids in this topology.
|
Fields |
getComponentOutputFields(GlobalStreamId id)
Gets the declared output fields for the specified global stream id.
|
Fields |
getComponentOutputFields(String componentId,
String streamId)
Gets the declared output fields for the specified component/stream.
|
Set<String> |
getComponentStreams(String componentId)
Gets the set of streams declared for the specified component.
|
List<Integer> |
getComponentTasks(String componentId)
Gets the task ids allocated for the given component id.
|
Map<String,Object> |
getConf() |
StormTopology |
getRawTopology()
Gets the Thrift object representing the topology.
|
Map<GlobalStreamId,Grouping> |
getSources(String componentId)
Gets the declared inputs to the specified component.
|
String |
getStormId()
Gets the unique id assigned to this topology.
|
Map<String,Map<String,Grouping>> |
getTargets(String componentId)
Gets information about who is consuming the outputs of the specified component, and how.
|
Map<Integer,String> |
getTaskToComponent()
Gets a map from task id to component id.
|
int |
maxTopologyMessageTimeout() |
String |
toJSONString() |
public String getStormId()
public StormTopology getRawTopology()
public String getComponentId(int taskId)
taskId
- the task idpublic Set<String> getComponentStreams(String componentId)
public List<Integer> getComponentTasks(String componentId)
public Fields getComponentOutputFields(String componentId, String streamId)
public Fields getComponentOutputFields(GlobalStreamId id)
public Map<GlobalStreamId,Grouping> getSources(String componentId)
public Map<String,Map<String,Grouping>> getTargets(String componentId)
public String toJSONString()
toJSONString
in interface org.apache.storm.shade.org.json.simple.JSONAware
public Map<Integer,String> getTaskToComponent()
public Set<String> getComponentIds()
public ComponentCommon getComponentCommon(String componentId)
public int maxTopologyMessageTimeout()
public boolean doSanityCheck()
Copyright © 2023 The Apache Software Foundation. All rights reserved.