Search in sources :

Example 6 with SpoutNode

use of org.apache.storm.trident.planner.SpoutNode in project storm by apache.

the class TridentTopology method newDRPCStream.

private Stream newDRPCStream(DRPCSpout spout) {
    // TODO: consider adding a shuffle grouping after the spout to avoid so much routing of the args/return-info all over the place
    // (at least until its possible to just pack bolt logic into the spout itself)
    Node n = new SpoutNode(getUniqueStreamId(), TridentUtils.getSingleOutputStreamFields(spout), null, spout, SpoutNode.SpoutType.DRPC);
    Stream nextStream = addNode(n);
    // later on, this will be joined back with return-info and all the results
    return nextStream.project(new Fields("args"));
}
Also used : Fields(org.apache.storm.tuple.Fields) SpoutNode(org.apache.storm.trident.planner.SpoutNode) 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)

Aggregations

SpoutNode (org.apache.storm.trident.planner.SpoutNode)6 Node (org.apache.storm.trident.planner.Node)5 PartitionNode (org.apache.storm.trident.planner.PartitionNode)5 ProcessorNode (org.apache.storm.trident.planner.ProcessorNode)5 GroupedStream (org.apache.storm.trident.fluent.GroupedStream)2 IAggregatableStream (org.apache.storm.trident.fluent.IAggregatableStream)2 Group (org.apache.storm.trident.graph.Group)2 Fields (org.apache.storm.tuple.Fields)2 DRPCSpout (org.apache.storm.drpc.DRPCSpout)1 GlobalStreamId (org.apache.storm.generated.GlobalStreamId)1 BoltDeclarer (org.apache.storm.topology.BoltDeclarer)1 IRichSpout (org.apache.storm.topology.IRichSpout)1 SpoutDeclarer (org.apache.storm.topology.SpoutDeclarer)1 ReturnResultsReducer (org.apache.storm.trident.drpc.ReturnResultsReducer)1 GraphGrouper (org.apache.storm.trident.graph.GraphGrouper)1 SubtopologyBolt (org.apache.storm.trident.planner.SubtopologyBolt)1 BatchSpoutExecutor (org.apache.storm.trident.spout.BatchSpoutExecutor)1 IBatchSpout (org.apache.storm.trident.spout.IBatchSpout)1 ITridentSpout (org.apache.storm.trident.spout.ITridentSpout)1 TridentTopologyBuilder (org.apache.storm.trident.topology.TridentTopologyBuilder)1