Search in sources :

Example 1 with MultiReducerProcessor

use of org.apache.storm.trident.planner.processor.MultiReducerProcessor in project storm by apache.

the class TridentTopology method multiReduce.

public Stream multiReduce(List<Fields> inputFields, List<Stream> streams, MultiReducer function, Fields outputFields) {
    List<String> names = new ArrayList<>();
    for (Stream s : streams) {
        if (s._name != null) {
            names.add(s._name);
        }
    }
    Node n = new ProcessorNode(getUniqueStreamId(), Utils.join(names, "-"), outputFields, outputFields, new MultiReducerProcessor(inputFields, function));
    return addSourcedNode(streams, n);
}
Also used : ProcessorNode(org.apache.storm.trident.planner.ProcessorNode) ProcessorNode(org.apache.storm.trident.planner.ProcessorNode) Node(org.apache.storm.trident.planner.Node) PartitionNode(org.apache.storm.trident.planner.PartitionNode) SpoutNode(org.apache.storm.trident.planner.SpoutNode) GroupedStream(org.apache.storm.trident.fluent.GroupedStream) IAggregatableStream(org.apache.storm.trident.fluent.IAggregatableStream) MultiReducerProcessor(org.apache.storm.trident.planner.processor.MultiReducerProcessor)

Aggregations

GroupedStream (org.apache.storm.trident.fluent.GroupedStream)1 IAggregatableStream (org.apache.storm.trident.fluent.IAggregatableStream)1 Node (org.apache.storm.trident.planner.Node)1 PartitionNode (org.apache.storm.trident.planner.PartitionNode)1 ProcessorNode (org.apache.storm.trident.planner.ProcessorNode)1 SpoutNode (org.apache.storm.trident.planner.SpoutNode)1 MultiReducerProcessor (org.apache.storm.trident.planner.processor.MultiReducerProcessor)1