@Internal public class StreamTaskSourceInput<T> extends Object implements StreamTaskInput<T>
StreamTaskInput
that reads data from the SourceOperator
and
returns the InputStatus
to indicate whether the source state is available, unavailable or
finished.PushingAsyncDataInput.DataOutput<T>
AvailabilityProvider.AvailabilityHelper
UNSPECIFIED
AVAILABLE
Constructor and Description |
---|
StreamTaskSourceInput(SourceOperator<T,?> operator) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
InputStatus |
emitNext(PushingAsyncDataInput.DataOutput<T> output)
Pushes the next element 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()
This method is invalid and never called by the one/source input processor.
|
CompletableFuture<Void> |
prepareSnapshot(ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isApproximatelyAvailable, isAvailable
public StreamTaskSourceInput(SourceOperator<T,?> operator)
public InputStatus emitNext(PushingAsyncDataInput.DataOutput<T> output) throws Exception
PushingAsyncDataInput
This method should be non blocking.
emitNext
in interface PushingAsyncDataInput<T>
Exception
public CompletableFuture<?> getAvailableFuture()
getAvailableFuture
in interface AvailabilityProvider
public int getInputIndex()
getInputIndex
in interface StreamTaskInput<T>
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId)
StreamTaskInput
prepareSnapshot
in interface StreamTaskInput<T>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.