Package org.apache.heron.api.topology
Interface GeneralTopologyContext
-
- All Known Subinterfaces:
TopologyContext
public interface GeneralTopologyContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description 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 topologyFields
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.org.apache.heron.api.generated.TopologyAPI.Topology
getRawTopology()
Deprecated.for backwards compatibility purposesMap<org.apache.heron.api.generated.TopologyAPI.StreamId,org.apache.heron.api.generated.TopologyAPI.Grouping>
getSources(String componentId)
Gets the declared inputs to the specified component.Map<String,Map<String,org.apache.heron.api.generated.TopologyAPI.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.String
getTopologyId()
Gets the unique id assigned to this topology.int
maxTopologyMessageTimeout()
-
-
-
Method Detail
-
getTopologyId
String getTopologyId()
Gets the unique id assigned to this topology. The id is the topology name with a unique nonce appended to it.- Returns:
- the topology id
-
getRawTopology
@Deprecated org.apache.heron.api.generated.TopologyAPI.Topology getRawTopology()
Deprecated.for backwards compatibility purposesGets the Protobuf object representing the topology. Deprecated. Only for storm compatiblity purposes- Returns:
- the Protobuf definition representing the topology
-
getComponentId
String getComponentId(int taskId)
Gets 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
-
getComponentStreams
Set<String> getComponentStreams(String componentId)
Gets the set of streams declared for the specified component.
-
getComponentTasks
List<Integer> getComponentTasks(String componentId)
Gets the task ids allocated for the given component id. The task ids are always returned in ascending order.
-
getComponentOutputFields
Fields getComponentOutputFields(String componentId, String streamId)
Gets the declared output fields for the specified component/stream.
-
getSources
Map<org.apache.heron.api.generated.TopologyAPI.StreamId,org.apache.heron.api.generated.TopologyAPI.Grouping> getSources(String componentId)
Gets the declared inputs to the specified component.- Returns:
- A map from subscribed component/stream to the grouping subscribed with.
-
getTargets
Map<String,Map<String,org.apache.heron.api.generated.TopologyAPI.Grouping>> getTargets(String componentId)
Gets 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.
-
getTaskToComponent
Map<Integer,String> getTaskToComponent()
Gets a map from task id to component id.
-
maxTopologyMessageTimeout
int maxTopologyMessageTimeout()
-
-