@Override public final PCollection<T> expand(PBegin input) { try { PCollection<T> pc = Pipeline.applyTransform(input, Impulse.create()) .apply( ParDo.of( DecodeAndEmitDoFn.fromIterable( transform.getElements(), originalOutput.getCoder()))); pc.setCoder(originalOutput.getCoder()); return pc; } catch (IOException e) { throw new IllegalStateException("Unable to encode elements.", e); } }
public Iterable<T> getElements() { return transform.getElements(); }