@Internal public class RecordWriterOutput<OUT> extends Object implements WatermarkGaugeExposingOutput<StreamRecord<OUT>>, OutputWithChainingCheck<StreamRecord<OUT>>
Output
that sends data using a RecordWriter
.Constructor and Description |
---|
RecordWriterOutput(RecordWriter<SerializationDelegate<StreamRecord<OUT>>> recordWriter,
TypeSerializer<OUT> outSerializer,
OutputTag outputTag,
boolean supportsUnalignedCheckpoints) |
Modifier and Type | Method and Description |
---|---|
void |
abortCheckpoint(long checkpointId,
CheckpointException cause) |
void |
alignedBarrierTimeout(long checkpointId) |
void |
broadcastEvent(AbstractEvent event,
boolean isPriorityEvent) |
void |
close()
Closes the collector.
|
<X> void |
collect(OutputTag<X> outputTag,
StreamRecord<X> record)
Emits a record to the side output identified by the given
OutputTag . |
void |
collect(StreamRecord<OUT> record)
Emits a record.
|
<X> boolean |
collectAndCheckIfChained(OutputTag<X> outputTag,
StreamRecord<X> record) |
boolean |
collectAndCheckIfChained(StreamRecord<OUT> record) |
void |
emitLatencyMarker(LatencyMarker latencyMarker) |
void |
emitWatermark(Watermark mark)
Emits a
Watermark from an operator. |
void |
emitWatermarkStatus(WatermarkStatus watermarkStatus) |
void |
flush() |
Gauge<Long> |
getWatermarkGauge() |
void |
setNumRecordsOut(Counter numRecordsOut) |
public RecordWriterOutput(RecordWriter<SerializationDelegate<StreamRecord<OUT>>> recordWriter, TypeSerializer<OUT> outSerializer, OutputTag outputTag, boolean supportsUnalignedCheckpoints)
public void collect(StreamRecord<OUT> record)
Collector
collect
in interface Collector<StreamRecord<OUT>>
record
- The record to collect.public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record)
Output
OutputTag
.collect
in interface Output<StreamRecord<OUT>>
record
- The record to collect.public boolean collectAndCheckIfChained(StreamRecord<OUT> record)
collectAndCheckIfChained
in interface OutputWithChainingCheck<StreamRecord<OUT>>
public <X> boolean collectAndCheckIfChained(OutputTag<X> outputTag, StreamRecord<X> record)
collectAndCheckIfChained
in interface OutputWithChainingCheck<StreamRecord<OUT>>
public void emitWatermark(Watermark mark)
Output
Watermark
from 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.
emitWatermark
in interface Output<StreamRecord<OUT>>
public void emitWatermarkStatus(WatermarkStatus watermarkStatus)
emitWatermarkStatus
in interface Output<StreamRecord<OUT>>
public void emitLatencyMarker(LatencyMarker latencyMarker)
emitLatencyMarker
in interface Output<StreamRecord<OUT>>
public void setNumRecordsOut(Counter numRecordsOut)
public void broadcastEvent(AbstractEvent event, boolean isPriorityEvent) throws IOException
IOException
public void alignedBarrierTimeout(long checkpointId) throws IOException
IOException
public void abortCheckpoint(long checkpointId, CheckpointException cause)
public void flush() throws IOException
IOException
public void close()
Collector
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Collector<StreamRecord<OUT>>
public Gauge<Long> getWatermarkGauge()
getWatermarkGauge
in interface WatermarkGaugeExposingOutput<StreamRecord<OUT>>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.