Search in sources :

Example 6 with BaseWindowedSink

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;
}
Also used : BaseWindowedSink(edu.iu.dsc.tws.task.window.core.BaseWindowedSink) BaseWindowSource(edu.iu.dsc.tws.task.window.BaseWindowSource)

Aggregations

BaseWindowedSink (edu.iu.dsc.tws.task.window.core.BaseWindowedSink)6 BaseWindowSource (edu.iu.dsc.tws.task.window.BaseWindowSource)4 IterativeAccuracyReduceFunction (edu.iu.dsc.tws.examples.ml.svm.aggregate.IterativeAccuracyReduceFunction)1 ReduceAggregator (edu.iu.dsc.tws.examples.ml.svm.aggregate.ReduceAggregator)1 IterativeStreamingCompute (edu.iu.dsc.tws.examples.ml.svm.compute.IterativeStreamingCompute)1 IterativeStreamingSinkEvaluator (edu.iu.dsc.tws.examples.ml.svm.compute.window.IterativeStreamingSinkEvaluator)1 IterativeStreamingWindowedCompute (edu.iu.dsc.tws.examples.ml.svm.compute.window.IterativeStreamingWindowedCompute)1 IterativeStreamingDataStreamer (edu.iu.dsc.tws.examples.ml.svm.streamer.IterativeStreamingDataStreamer)1 WindowArguments (edu.iu.dsc.tws.examples.ml.svm.util.WindowArguments)1 EventTimeData (edu.iu.dsc.tws.examples.task.streaming.windowing.data.EventTimeData)1 EventTimeExtractor (edu.iu.dsc.tws.examples.task.streaming.windowing.extract.EventTimeExtractor)1 ComputeConnection (edu.iu.dsc.tws.task.impl.ComputeConnection)1 WindowConfig (edu.iu.dsc.tws.task.window.config.WindowConfig)1 WindowType (edu.iu.dsc.tws.task.window.constant.WindowType)1 TimeUnit (java.util.concurrent.TimeUnit)1