use of edu.iu.dsc.tws.task.window.core.BaseWindowedSink in project twister2 by DSC-SPIDAL.
the class STWindowMPI method buildTaskGraph.
@Override
public ComputeGraphBuilder buildTaskGraph() {
List<Integer> taskStages = jobParameters.getTaskStages();
int sourceParallelism = taskStages.get(0);
int sinkParallelism = taskStages.get(1);
String edge = "edge";
BaseWindowSource g = new SourceWindowTask(edge);
// Tumbling Window
BaseWindowedSink dw = new DirectWindowedReceivingTask().withTumblingCountWindow(1);
computeGraphBuilder.addSource(SOURCE, g, sourceParallelism);
computeConnection = computeGraphBuilder.addCompute(SINK, dw, sinkParallelism);
computeConnection.direct(SOURCE).viaEdge(edge).withDataType(MessageTypes.INTEGER_ARRAY);
return computeGraphBuilder;
}
Aggregations