public class DirectedOutput<OUT> extends Object implements OperatorChain.WatermarkGaugeExposingOutput<StreamRecord<OUT>>
Modifier and Type | Field and Description |
---|---|
protected Output<StreamRecord<OUT>>[] |
allOutputs |
protected HashMap<String,Output<StreamRecord<OUT>>[]> |
outputMap |
protected OutputSelector<OUT>[] |
outputSelectors |
protected Output<StreamRecord<OUT>>[] |
selectAllOutputs |
protected WatermarkGauge |
watermarkGauge |
Constructor and Description |
---|
DirectedOutput(List<OutputSelector<OUT>> outputSelectors,
List<? extends Tuple2<? extends Output<StreamRecord<OUT>>,StreamEdge>> outputs) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the collector.
|
<X> void |
collect(OutputTag<X> outputTag,
StreamRecord<X> record)
Emits a record the side output identified by the given
OutputTag . |
void |
collect(StreamRecord<OUT> record)
Emits a record.
|
void |
emitLatencyMarker(LatencyMarker latencyMarker) |
void |
emitWatermark(Watermark mark)
Emits a
Watermark from an operator. |
Gauge<Long> |
getWatermarkGauge() |
protected Set<Output<StreamRecord<OUT>>> |
selectOutputs(StreamRecord<OUT> record) |
protected final OutputSelector<OUT>[] outputSelectors
protected final Output<StreamRecord<OUT>>[] selectAllOutputs
protected final HashMap<String,Output<StreamRecord<OUT>>[]> outputMap
protected final Output<StreamRecord<OUT>>[] allOutputs
protected final WatermarkGauge watermarkGauge
public DirectedOutput(List<OutputSelector<OUT>> outputSelectors, List<? extends Tuple2<? extends Output<StreamRecord<OUT>>,StreamEdge>> outputs)
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 emitLatencyMarker(LatencyMarker latencyMarker)
emitLatencyMarker
in interface Output<StreamRecord<OUT>>
protected Set<Output<StreamRecord<OUT>>> selectOutputs(StreamRecord<OUT> record)
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 void close()
Collector
close
in interface Collector<StreamRecord<OUT>>
public Gauge<Long> getWatermarkGauge()
getWatermarkGauge
in interface OperatorChain.WatermarkGaugeExposingOutput<StreamRecord<OUT>>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.