public final class MultiInputSortingDataInput<IN,K> extends Object implements StreamTaskInput<IN>
MultiInputSortingDataInput
have finished sorting as well.
Moreover it will report it is available
or approximately available
if it has some records pending only if the
head of the CommonContext#getQueueOfHeads()
belongs to the input. That way there is only
ever one input that reports it is available.
The sorter uses binary comparison of keys, which are extracted and serialized when received
from the chained input. Moreover the timestamps of incoming records are used for secondary
ordering. For the comparison it uses either FixedLengthByteKeyComparator
if the length of
the serialized key is constant, or VariableLengthByteKeyComparator
otherwise.
Watermarks, watermark statuses, nor latency markers are propagated downstream as they do not make sense with buffered records. The input emits the largest watermark seen after all records.
Modifier and Type | Class and Description |
---|---|
static class |
MultiInputSortingDataInput.SelectableSortingInputs
A wrapper that combines sorting
inputs with a InputSelectable
that should be used to choose which input to consume next from. |
PushingAsyncDataInput.DataOutput<T>
AvailabilityProvider.AvailabilityHelper
UNSPECIFIED
AVAILABLE
Modifier and Type | Method and Description |
---|---|
void |
close() |
DataInputStatus |
emitNext(PushingAsyncDataInput.DataOutput<IN> output)
Pushes elements to the output from current data input, and returns the input status to
indicate whether there are more available data in current input.
|
CompletableFuture<?> |
getAvailableFuture() |
int |
getInputIndex()
Returns the input index of this input.
|
CompletableFuture<Void> |
prepareSnapshot(ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
static <K> MultiInputSortingDataInput.SelectableSortingInputs |
wrapInputs(TaskInvokable containingTask,
StreamTaskInput<Object>[] sortingInputs,
KeySelector<Object,K>[] keySelectors,
TypeSerializer<Object>[] inputSerializers,
TypeSerializer<K> keySerializer,
StreamTaskInput<Object>[] passThroughInputs,
MemoryManager memoryManager,
IOManager ioManager,
boolean objectReuse,
double managedMemoryFraction,
Configuration taskManagerConfiguration,
ExecutionConfig executionConfig) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, isApproximatelyAvailable, isAvailable, or
public static <K> MultiInputSortingDataInput.SelectableSortingInputs wrapInputs(TaskInvokable containingTask, StreamTaskInput<Object>[] sortingInputs, KeySelector<Object,K>[] keySelectors, TypeSerializer<Object>[] inputSerializers, TypeSerializer<K> keySerializer, StreamTaskInput<Object>[] passThroughInputs, MemoryManager memoryManager, IOManager ioManager, boolean objectReuse, double managedMemoryFraction, Configuration taskManagerConfiguration, ExecutionConfig executionConfig)
public int getInputIndex()
StreamTaskInput
getInputIndex
in interface StreamTaskInput<IN>
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId)
StreamTaskInput
prepareSnapshot
in interface StreamTaskInput<IN>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public DataInputStatus emitNext(PushingAsyncDataInput.DataOutput<IN> output) throws Exception
PushingAsyncDataInput
This method should be non blocking.
emitNext
in interface PushingAsyncDataInput<IN>
Exception
public CompletableFuture<?> getAvailableFuture()
getAvailableFuture
in interface AvailabilityProvider
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.