Search in sources :

Example 1 with ImpulseSource

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

the class ImpulseTranslatorBatch method translateNode.

@Override
public void translateNode(Impulse transform, Twister2BatchTranslationContext context) {
    final TSetEnvironment tsetEnv = context.getEnvironment();
    SourceTSet<WindowedValue<byte[]>> sourceTSet = ((BatchTSetEnvironment) tsetEnv).createSource(new ImpulseSource(), 1);
    PCollection<byte[]> output = context.getOutput(transform);
    context.setOutputDataSet(output, sourceTSet);
}
Also used : BatchTSetEnvironment(edu.iu.dsc.tws.tset.env.BatchTSetEnvironment) WindowedValue(org.apache.beam.sdk.util.WindowedValue) TSetEnvironment(edu.iu.dsc.tws.tset.env.TSetEnvironment) BatchTSetEnvironment(edu.iu.dsc.tws.tset.env.BatchTSetEnvironment) ImpulseSource(org.apache.beam.runners.twister2.translators.functions.ImpulseSource)

Aggregations

BatchTSetEnvironment (edu.iu.dsc.tws.tset.env.BatchTSetEnvironment)1 TSetEnvironment (edu.iu.dsc.tws.tset.env.TSetEnvironment)1 ImpulseSource (org.apache.beam.runners.twister2.translators.functions.ImpulseSource)1 WindowedValue (org.apache.beam.sdk.util.WindowedValue)1