Class FileSourceSplitState<SplitT extends FileSourceSplit>
java.lang.Object
org.apache.flink.connector.file.src.FileSourceSplitState<SplitT>
@PublicEvolving
public final class FileSourceSplitState<SplitT extends FileSourceSplit>
extends Object
State of the reader, essentially a mutable version of the
FileSourceSplit. Has a
modifiable offset and records-to-skip-count.
The FileSourceSplit assigned to the reader or stored in the checkpoint points to the
position from where to start reading (after recovery), so the current offset and records-to-skip
need to always point to the record after the last emitted record.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongvoidsetOffset(long offset) voidsetPosition(long offset, long recordsToSkipAfterOffset) voidsetPosition(CheckpointedPosition position) voidsetRecordsToSkipAfterOffset(long recordsToSkipAfterOffset) Use the current row count as the starting row count to create a new FileSourceSplit.
-
Constructor Details
-
FileSourceSplitState
-
-
Method Details
-
getOffset
public long getOffset() -
getRecordsToSkipAfterOffset
public long getRecordsToSkipAfterOffset() -
setOffset
public void setOffset(long offset) -
setRecordsToSkipAfterOffset
public void setRecordsToSkipAfterOffset(long recordsToSkipAfterOffset) -
setPosition
public void setPosition(long offset, long recordsToSkipAfterOffset) -
setPosition
-
toFileSourceSplit
Use the current row count as the starting row count to create a new FileSourceSplit.
-