IN1 - The type of the records that arrive on the first inputIN2 - The type of the records that arrive on the second input@Internal public class StreamTwoInputProcessor<IN1,IN2> extends Object
TwoInputStreamTask.
This also keeps track of Watermark events and forwards them to event subscribers
once the Watermark from all inputs advances.
Forwarding elements or watermarks must be protected by synchronizing on the given lock
object. This ensures that we don't call methods on a TwoInputStreamOperator concurrently
with the timer callback or other things.
| Constructor and Description |
|---|
StreamTwoInputProcessor(Collection<org.apache.flink.runtime.io.network.partition.consumer.InputGate> inputGates1,
Collection<org.apache.flink.runtime.io.network.partition.consumer.InputGate> inputGates2,
org.apache.flink.api.common.typeutils.TypeSerializer<IN1> inputSerializer1,
org.apache.flink.api.common.typeutils.TypeSerializer<IN2> inputSerializer2,
org.apache.flink.runtime.util.event.EventListener<org.apache.flink.runtime.io.network.api.CheckpointBarrier> checkpointListener,
CheckpointingMode checkpointMode,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
boolean enableWatermarkMultiplexing) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
boolean |
processInput(TwoInputStreamOperator<IN1,IN2,?> streamOperator,
Object lock) |
void |
setMetricGroup(org.apache.flink.runtime.metrics.groups.IOMetricGroup metrics)
Sets the metric group for this StreamTwoInputProcessor.
|
void |
setReporter(org.apache.flink.runtime.accumulators.AccumulatorRegistry.Reporter reporter) |
public StreamTwoInputProcessor(Collection<org.apache.flink.runtime.io.network.partition.consumer.InputGate> inputGates1, Collection<org.apache.flink.runtime.io.network.partition.consumer.InputGate> inputGates2, org.apache.flink.api.common.typeutils.TypeSerializer<IN1> inputSerializer1, org.apache.flink.api.common.typeutils.TypeSerializer<IN2> inputSerializer2, org.apache.flink.runtime.util.event.EventListener<org.apache.flink.runtime.io.network.api.CheckpointBarrier> checkpointListener, CheckpointingMode checkpointMode, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, boolean enableWatermarkMultiplexing) throws IOException
IOExceptionpublic boolean processInput(TwoInputStreamOperator<IN1,IN2,?> streamOperator, Object lock) throws Exception
Exceptionpublic void setReporter(org.apache.flink.runtime.accumulators.AccumulatorRegistry.Reporter reporter)
public void setMetricGroup(org.apache.flink.runtime.metrics.groups.IOMetricGroup metrics)
metrics - metric grouppublic void cleanup()
throws IOException
IOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.