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>>
WrappingOutputthat updates metrics on the number of emitted elements.
-
-
Constructor Summary
Constructors Constructor Description CountingOutput(WatermarkGaugeExposingOutput<StreamRecord<OUT>> output, org.apache.flink.metrics.Counter numRecordsOut)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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>getWatermarkGauge()
-
-
-
Constructor Detail
-
CountingOutput
public CountingOutput(WatermarkGaugeExposingOutput<StreamRecord<OUT>> output, org.apache.flink.metrics.Counter numRecordsOut)
-
-
Method Detail
-
emitWatermark
public void emitWatermark(Watermark mark)
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
public void emitWatermarkStatus(WatermarkStatus watermarkStatus)
- Specified by:
emitWatermarkStatusin interfaceOutput<OUT>
-
emitLatencyMarker
public void emitLatencyMarker(LatencyMarker latencyMarker)
- Specified by:
emitLatencyMarkerin interfaceOutput<OUT>
-
collect
public void collect(StreamRecord<OUT> record)
- Specified by:
collectin interfaceorg.apache.flink.util.Collector<OUT>
-
collect
public <X> void collect(org.apache.flink.util.OutputTag<X> outputTag, StreamRecord<X> record)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
public org.apache.flink.metrics.Gauge<Long> getWatermarkGauge()
- Specified by:
getWatermarkGaugein interfaceWatermarkGaugeExposingOutput<OUT>
-
emitRecordAttributes
public void emitRecordAttributes(RecordAttributes recordAttributes)
Description copied from interface:OutputEmits aRecordAttributesfrom an operator. This element is broadcast to all downstream operators.- Specified by:
emitRecordAttributesin interfaceOutput<OUT>
-
emitWatermark
public void emitWatermark(WatermarkEvent watermark)
Description copied from interface:OutputEmits aWatermarkfrom an operator, wrapped in aWatermarkEvent.- Specified by:
emitWatermarkin interfaceOutput<OUT>
-
-