Class RecordWriterOutput<OUT>
- java.lang.Object
-
- org.apache.flink.streaming.runtime.io.RecordWriterOutput<OUT>
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Output<StreamRecord<OUT>>,OutputWithChainingCheck<StreamRecord<OUT>>,WatermarkGaugeExposingOutput<StreamRecord<OUT>>,org.apache.flink.util.Collector<StreamRecord<OUT>>
@Internal public class RecordWriterOutput<OUT> extends Object implements WatermarkGaugeExposingOutput<StreamRecord<OUT>>, OutputWithChainingCheck<StreamRecord<OUT>>
Implementation ofOutputthat sends data using aRecordWriter.
-
-
Constructor Summary
Constructors Constructor Description RecordWriterOutput(RecordWriter<SerializationDelegate<StreamRecord<OUT>>> recordWriter, org.apache.flink.api.common.typeutils.TypeSerializer<OUT> outSerializer, org.apache.flink.util.OutputTag outputTag, boolean supportsUnalignedCheckpoints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortCheckpoint(long checkpointId, CheckpointException cause)voidalignedBarrierTimeout(long checkpointId)voidbroadcastEvent(AbstractEvent event, boolean isPriorityEvent)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.booleancollectAndCheckIfChained(StreamRecord<OUT> record)<X> booleancollectAndCheckIfChained(org.apache.flink.util.OutputTag<X> outputTag, StreamRecord<X> record)voidemitLatencyMarker(LatencyMarker latencyMarker)voidemitRecordAttributes(RecordAttributes recordAttributes)Emits aRecordAttributesfrom an operator.voidemitWatermark(Watermark mark)Emits aWatermarkfrom an operator.voidemitWatermarkStatus(WatermarkStatus watermarkStatus)voidflush()org.apache.flink.metrics.Gauge<Long>getWatermarkGauge()voidsetNumRecordsOut(org.apache.flink.metrics.Counter numRecordsOut)
-
-
-
Constructor Detail
-
RecordWriterOutput
public RecordWriterOutput(RecordWriter<SerializationDelegate<StreamRecord<OUT>>> recordWriter, org.apache.flink.api.common.typeutils.TypeSerializer<OUT> outSerializer, org.apache.flink.util.OutputTag outputTag, boolean supportsUnalignedCheckpoints)
-
-
Method Detail
-
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.
-
collectAndCheckIfChained
public boolean collectAndCheckIfChained(StreamRecord<OUT> record)
- Specified by:
collectAndCheckIfChainedin interfaceOutputWithChainingCheck<OUT>- Returns:
- true if the collected record has been emitted to a downstream subtask. Otherwise, false.
-
collectAndCheckIfChained
public <X> boolean collectAndCheckIfChained(org.apache.flink.util.OutputTag<X> outputTag, StreamRecord<X> record)- Specified by:
collectAndCheckIfChainedin interfaceOutputWithChainingCheck<OUT>- Returns:
- true if the collected record has been emitted to a downstream subtask. Otherwise, false.
-
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>
-
setNumRecordsOut
public void setNumRecordsOut(org.apache.flink.metrics.Counter numRecordsOut)
-
broadcastEvent
public void broadcastEvent(AbstractEvent event, boolean isPriorityEvent) throws IOException
- Throws:
IOException
-
alignedBarrierTimeout
public void alignedBarrierTimeout(long checkpointId) throws IOException- Throws:
IOException
-
abortCheckpoint
public void abortCheckpoint(long checkpointId, CheckpointException cause)
-
flush
public void flush() throws IOException- Throws:
IOException
-
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>
-
-