public class StreamConsumers
extends java.lang.Object
Constructor and Description |
---|
StreamConsumers() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<Grouping> |
getConsumers() |
java.util.List<java.lang.Integer> |
getListToSend(HeronTuples.HeronDataTuple tuple)
Get all task ids from different components to send for a data tuple
|
void |
newConsumer(TopologyAPI.InputStream inputStream,
TopologyAPI.StreamSchema schema,
java.util.List<java.lang.Integer> taskIds) |
static java.util.Map<TopologyAPI.StreamId,StreamConsumers> |
populateStreamConsumers(TopologyAPI.Topology topology,
java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> componentToTaskIds)
Populate the Stream Consumers for the whole topology given the topology protobuf.
|
public static java.util.Map<TopologyAPI.StreamId,StreamConsumers> populateStreamConsumers(TopologyAPI.Topology topology, java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> componentToTaskIds)
topology
- The given topology protobufcomponentToTaskIds
- the map of componentName to its list of taskIds in the topologypublic void newConsumer(TopologyAPI.InputStream inputStream, TopologyAPI.StreamSchema schema, java.util.List<java.lang.Integer> taskIds)
public java.util.List<java.lang.Integer> getListToSend(HeronTuples.HeronDataTuple tuple)
tuple
- the tuple to sendprotected java.util.List<Grouping> getConsumers()