Class CountingOutput<OUT>
java.lang.Object
org.apache.flink.streaming.api.operators.CountingOutput<OUT>
- All Implemented Interfaces:
Closeable,AutoCloseable,Output<StreamRecord<OUT>>,WatermarkGaugeExposingOutput<StreamRecord<OUT>>,org.apache.flink.util.Collector<StreamRecord<OUT>>
public class CountingOutput<OUT>
extends Object
implements WatermarkGaugeExposingOutput<StreamRecord<OUT>>
Wrapping
Output that updates metrics on the number of emitted elements.-
Constructor Summary
ConstructorsConstructorDescriptionCountingOutput(WatermarkGaugeExposingOutput<StreamRecord<OUT>> output, org.apache.flink.metrics.Counter numRecordsOut) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidcollect(StreamRecord<OUT> record) <X> voidcollect(org.apache.flink.util.OutputTag<X> outputTag, StreamRecord<X> record) Emits a record to the side output identified by the givenOutputTag.voidemitLatencyMarker(LatencyMarker latencyMarker) voidemitRecordAttributes(RecordAttributes recordAttributes) Emits aRecordAttributesfrom an operator.voidemitWatermark(WatermarkEvent watermark) Emits aWatermarkfrom an operator, wrapped in aWatermarkEvent.voidemitWatermark(Watermark mark) Emits aWatermarkfrom an operator.voidemitWatermarkStatus(WatermarkStatus watermarkStatus) org.apache.flink.metrics.Gauge<Long>
-
Constructor Details
-
CountingOutput
public CountingOutput(WatermarkGaugeExposingOutput<StreamRecord<OUT>> output, org.apache.flink.metrics.Counter numRecordsOut)
-
-
Method Details
-
emitWatermark
Description copied from interface:OutputEmits aWatermarkfrom an operator. This watermark is broadcast to all downstream operators.A watermark specifies that no element with a timestamp lower or equal to the watermark timestamp will be emitted in the future.
- Specified by:
emitWatermarkin interfaceOutput<OUT>
-
emitWatermarkStatus
- Specified by:
emitWatermarkStatusin interfaceOutput<OUT>
-
emitLatencyMarker
- Specified by:
emitLatencyMarkerin interfaceOutput<OUT>
-
collect
- Specified by:
collectin interfaceorg.apache.flink.util.Collector<OUT>
-
collect
Description copied from interface:OutputEmits a record to the side output identified by the givenOutputTag. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.flink.util.Collector<OUT>
-
getWatermarkGauge
- Specified by:
getWatermarkGaugein interfaceWatermarkGaugeExposingOutput<OUT>
-
emitRecordAttributes
Description copied from interface:OutputEmits aRecordAttributesfrom an operator. This element is broadcast to all downstream operators.- Specified by:
emitRecordAttributesin interfaceOutput<OUT>
-
emitWatermark
Description copied from interface:OutputEmits aWatermarkfrom an operator, wrapped in aWatermarkEvent.- Specified by:
emitWatermarkin interfaceOutput<OUT>
-