Package org.apache.heron.simulator.utils
Class TopologyManager
- java.lang.Object
-
- org.apache.heron.simulator.utils.TopologyManager
-
public class TopologyManager extends Object
-
-
Constructor Summary
Constructors Constructor Description TopologyManager(org.apache.heron.api.generated.TopologyAPI.Topology topology)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
extractTopologyTimeout()
Extract the config value "topology.message.timeout.secs" for given topology protobufMap<String,List<Integer>>
getComponentToTaskIds()
Get the map <componentId -> taskIds> from the Physical PlanList<Integer>
getListToSend(org.apache.heron.api.generated.TopologyAPI.StreamId streamId, org.apache.heron.proto.system.HeronTuples.HeronDataTuple tuple)
org.apache.heron.proto.system.PhysicalPlans.PhysicalPlan
getPhysicalPlan()
Want get a PhysicalPlan basing the topology given.List<Integer>
getSpoutTasks()
HashMap<org.apache.heron.api.generated.TopologyAPI.StreamId,List<Grouping>>
getStreamConsumers()
Get the stream consumers map that was generated from the topologyorg.apache.heron.api.generated.TopologyAPI.Topology
getTopology()
-
-
-
Method Detail
-
getTopology
public org.apache.heron.api.generated.TopologyAPI.Topology getTopology()
-
getPhysicalPlan
public org.apache.heron.proto.system.PhysicalPlans.PhysicalPlan getPhysicalPlan()
Want get a PhysicalPlan basing the topology given. It would contain one fake stream mgr/container info. And all instances would be belong to this container.- Returns:
- Physical Plan containing this topology
-
getComponentToTaskIds
public Map<String,List<Integer>> getComponentToTaskIds()
Get the map <componentId -> taskIds> from the Physical Plan- Returns:
- the map from componentId to its task ids
-
extractTopologyTimeout
public Duration extractTopologyTimeout()
Extract the config value "topology.message.timeout.secs" for given topology protobuf- Returns:
- the config value of "topology.message.timeout.secs"
-
getStreamConsumers
public HashMap<org.apache.heron.api.generated.TopologyAPI.StreamId,List<Grouping>> getStreamConsumers()
Get the stream consumers map that was generated from the topology- Returns:
- the populated stream consumers' map
-
-