Search in sources :

Example 1 with Twister2SinkFunction

use of org.apache.beam.runners.twister2.translators.functions.Twister2SinkFunction in project twister2 by DSC-SPIDAL.

the class Twister2TranslationContext method execute.

public void execute() {
    Map<String, CachedTSet> sideInputTSets = new HashMap<>();
    for (Map.Entry<String, BatchTSet<?>> sides : sideInputDataSets.entrySet()) {
        CachedTSet tempCache = (CachedTSet) sides.getValue().cache();
        sideInputTSets.put(sides.getKey(), tempCache);
    }
    for (TSet leaf : leaves) {
        SinkTSet sinkTSet = (SinkTSet) leaf.direct().sink(new Twister2SinkFunction());
        addInputs(sinkTSet, sideInputTSets);
        eval(sinkTSet);
    }
}
Also used : SinkTSet(edu.iu.dsc.tws.tset.sets.batch.SinkTSet) BatchTSet(edu.iu.dsc.tws.api.tset.sets.batch.BatchTSet) CachedTSet(edu.iu.dsc.tws.tset.sets.batch.CachedTSet) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Twister2SinkFunction(org.apache.beam.runners.twister2.translators.functions.Twister2SinkFunction) CachedTSet(edu.iu.dsc.tws.tset.sets.batch.CachedTSet) BatchTSet(edu.iu.dsc.tws.api.tset.sets.batch.BatchTSet) ComputeTSet(edu.iu.dsc.tws.tset.sets.batch.ComputeTSet) SinkTSet(edu.iu.dsc.tws.tset.sets.batch.SinkTSet) TSet(edu.iu.dsc.tws.api.tset.sets.TSet) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map)

Example 2 with Twister2SinkFunction

use of org.apache.beam.runners.twister2.translators.functions.Twister2SinkFunction in project beam by apache.

the class BeamBatchWorker method executePipeline.

public void executePipeline(BatchTSetEnvironment env) {
    Map<String, CachedTSet> sideInputTSets = new HashMap<>();
    for (Map.Entry<String, BatchTSet<?>> sides : sideInputDataSets.entrySet()) {
        BatchTSet<?> sideTSet = sides.getValue();
        addInputs((BaseTSet) sideTSet, sideInputTSets);
        CachedTSet tempCache = (CachedTSet) sideTSet.cache();
        sideInputTSets.put(sides.getKey(), tempCache);
    }
    for (TSet leaf : leaves) {
        SinkTSet sinkTSet = (SinkTSet) leaf.direct().sink(new Twister2SinkFunction());
        addInputs(sinkTSet, sideInputTSets);
        eval(env, sinkTSet);
    }
}
Also used : SinkTSet(edu.iu.dsc.tws.tset.sets.batch.SinkTSet) BatchTSet(edu.iu.dsc.tws.api.tset.sets.batch.BatchTSet) CachedTSet(edu.iu.dsc.tws.tset.sets.batch.CachedTSet) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Twister2SinkFunction(org.apache.beam.runners.twister2.translators.functions.Twister2SinkFunction) ComputeTSet(edu.iu.dsc.tws.tset.sets.batch.ComputeTSet) BuildableTSet(edu.iu.dsc.tws.tset.sets.BuildableTSet) CachedTSet(edu.iu.dsc.tws.tset.sets.batch.CachedTSet) SinkTSet(edu.iu.dsc.tws.tset.sets.batch.SinkTSet) BaseTSet(edu.iu.dsc.tws.tset.sets.BaseTSet) TSet(edu.iu.dsc.tws.api.tset.sets.TSet) BatchTSet(edu.iu.dsc.tws.api.tset.sets.batch.BatchTSet) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map)

Aggregations

TSet (edu.iu.dsc.tws.api.tset.sets.TSet)2 BatchTSet (edu.iu.dsc.tws.api.tset.sets.batch.BatchTSet)2 CachedTSet (edu.iu.dsc.tws.tset.sets.batch.CachedTSet)2 ComputeTSet (edu.iu.dsc.tws.tset.sets.batch.ComputeTSet)2 SinkTSet (edu.iu.dsc.tws.tset.sets.batch.SinkTSet)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 Twister2SinkFunction (org.apache.beam.runners.twister2.translators.functions.Twister2SinkFunction)2 BaseTSet (edu.iu.dsc.tws.tset.sets.BaseTSet)1 BuildableTSet (edu.iu.dsc.tws.tset.sets.BuildableTSet)1