use of org.apache.flink.api.common.eventtime.WatermarkOutput in project flink by apache.
the class ProgressiveTimestampsAndWatermarks method createMainOutput.
// ------------------------------------------------------------------------
@Override
public ReaderOutput<T> createMainOutput(PushingAsyncDataInput.DataOutput<T> output, WatermarkUpdateListener watermarkEmitted) {
// At the moment, we assume only one output is ever created!
// This assumption is strict, currently, because many of the classes in this implementation
// do not
// support re-assigning the underlying output
checkState(currentMainOutput == null && currentPerSplitOutputs == null, "already created a main output");
final WatermarkOutput watermarkOutput = new WatermarkToDataOutput(output, watermarkEmitted);
final WatermarkGenerator<T> watermarkGenerator = watermarksFactory.createWatermarkGenerator(watermarksContext);
currentPerSplitOutputs = new SplitLocalOutputs<>(output, watermarkOutput, timestampAssigner, watermarksFactory, watermarksContext);
currentMainOutput = new StreamingReaderOutput<>(output, watermarkOutput, timestampAssigner, watermarkGenerator, currentPerSplitOutputs);
return currentMainOutput;
}
Aggregations