Package org.apache.storm.task
Class GeneralTopologyContext
java.lang.Object
org.apache.storm.task.GeneralTopologyContext
- All Implemented Interfaces:
- org.apache.storm.shade.net.minidev.json.JSONAware
- Direct Known Subclasses:
- WorkerTopologyContext
public class GeneralTopologyContext
extends Object
implements org.apache.storm.shade.net.minidev.json.JSONAware
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected boolean
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetComponentCommon(String componentId) getComponentId(int taskId) Gets the component id for the specified task id.Gets a list of all component ids in this topology.getComponentOutputFields(String componentId, String streamId) Gets the declared output fields for the specified component/stream.Gets the declared output fields for the specified global stream id.getComponentStreams(String componentId) Gets the set of streams declared for the specified component.getComponentTasks(String componentId) Gets the task ids allocated for the given component id.getConf()Gets the Thrift object representing the topology.getSources(String componentId) Gets the declared inputs to the specified component.Gets the unique id assigned to this topology.getTargets(String componentId) Gets information about who is consuming the outputs of the specified component, and how.Gets a map from task id to component id.int
- 
Field Details- 
topoConf
- 
doSanityCheckprotected boolean doSanityCheck
 
- 
- 
Constructor Details- 
GeneralTopologyContext
 
- 
- 
Method Details- 
getStormIdGets the unique id assigned to this topology. The id is the storm name with a unique nonce appended to it.- Returns:
- the storm id
 
- 
getRawTopologyGets the Thrift object representing the topology.- Returns:
- the Thrift definition representing the topology
 
- 
getComponentIdGets the component id for the specified task id. The component id maps to a component id specified for a Spout or Bolt in the topology definition.- Parameters:
- taskId- the task id
- Returns:
- the component id for the input task id
 
- 
getComponentStreamsGets the set of streams declared for the specified component.
- 
getComponentTasksGets the task ids allocated for the given component id. The task ids are always returned in ascending order.
- 
getComponentOutputFieldsGets the declared output fields for the specified component/stream.
- 
getComponentOutputFieldsGets the declared output fields for the specified global stream id.
- 
getSourcesGets the declared inputs to the specified component.- Returns:
- A map from subscribed component/stream to the grouping subscribed with.
 
- 
getTargetsGets information about who is consuming the outputs of the specified component, and how.- Returns:
- Map from stream id to component id to the Grouping used.
 
- 
toJSONString- Specified by:
- toJSONStringin interface- org.apache.storm.shade.net.minidev.json.JSONAware
 
- 
getTaskToComponentGets a map from task id to component id.
- 
getComponentIdsGets a list of all component ids in this topology.
- 
getComponentCommon
- 
maxTopologyMessageTimeoutpublic int maxTopologyMessageTimeout()
- 
getConf
- 
doSanityCheckpublic boolean doSanityCheck()
 
-