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 of
Output that sends data using a RecordWriter.-
Constructor Summary
ConstructorsConstructorDescriptionRecordWriterOutput(RecordWriter<SerializationDelegate<StreamRecord<OUT>>> recordWriter, org.apache.flink.api.common.typeutils.TypeSerializer<OUT> outSerializer, org.apache.flink.util.OutputTag outputTag, boolean supportsUnalignedCheckpoints) -
Method Summary
Modifier and TypeMethodDescriptionvoidabortCheckpoint(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(WatermarkEvent watermark) Emits aWatermarkfrom an operator, wrapped in aWatermarkEvent.voidemitWatermark(Watermark mark) Emits aWatermarkfrom an operator.voidemitWatermarkStatus(WatermarkStatus watermarkStatus) voidflush()org.apache.flink.metrics.Gauge<Long>voidsetNumRecordsOut(org.apache.flink.metrics.Counter numRecordsOut)
-
Constructor Details
-
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 Details
-
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. -
collectAndCheckIfChained
- 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
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>
-
setNumRecordsOut
public void setNumRecordsOut(org.apache.flink.metrics.Counter numRecordsOut) -
broadcastEvent
- Throws:
IOException
-
alignedBarrierTimeout
- Throws:
IOException
-
abortCheckpoint
-
flush
- Throws:
IOException
-
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>
-