public class GeneralTopologyContext
extends java.lang.Object
implements org.json.simple.JSONAware
Constructor and Description |
---|
GeneralTopologyContext(GeneralTopologyContext delegate) |
GeneralTopologyContext(StormTopology topology,
java.util.Map<java.lang.String,java.lang.Object> stormConf,
java.util.Map<java.lang.Integer,java.lang.String> taskToComponent,
java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> componentToSortedTasks,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Fields>> componentToStreamToFields,
java.lang.String stormId) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComponentId(int taskId)
Gets the component id for the specified task id.
|
java.util.Set<java.lang.String> |
getComponentIds()
Gets a list of all component ids in this topology
|
Fields |
getComponentOutputFields(java.lang.String componentId,
java.lang.String streamId)
Gets the declared output fields for the specified component/stream.
|
java.util.Set<java.lang.String> |
getComponentStreams(java.lang.String componentId)
Gets the set of streams declared for the specified component.
|
java.util.List<java.lang.Integer> |
getComponentTasks(java.lang.String componentId)
Gets the task ids allocated for the given component id.
|
java.lang.String |
getStormId()
Gets the unique id assigned to this topology.
|
java.util.Map<java.lang.Integer,java.lang.String> |
getTaskToComponent()
Gets a map from task id to component id.
|
java.lang.String |
toJSONString()
Gets information about who is consuming the outputs of the specified component,
and how.
|
public GeneralTopologyContext(StormTopology topology, java.util.Map<java.lang.String,java.lang.Object> stormConf, java.util.Map<java.lang.Integer,java.lang.String> taskToComponent, java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> componentToSortedTasks, java.util.Map<java.lang.String,java.util.Map<java.lang.String,Fields>> componentToStreamToFields, java.lang.String stormId)
public GeneralTopologyContext(GeneralTopologyContext delegate)
public java.lang.String getStormId()
public java.lang.String getComponentId(int taskId)
taskId
- the task idpublic java.util.Set<java.lang.String> getComponentStreams(java.lang.String componentId)
public java.util.List<java.lang.Integer> getComponentTasks(java.lang.String componentId)
public Fields getComponentOutputFields(java.lang.String componentId, java.lang.String streamId)
public java.lang.String toJSONString()
toJSONString
in interface org.json.simple.JSONAware
public java.util.Map<java.lang.Integer,java.lang.String> getTaskToComponent()
public java.util.Set<java.lang.String> getComponentIds()