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 theFileSourceSplit
. 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 Constructor Description FileSourceSplitState(SplitT split)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getOffset()
long
getRecordsToSkipAfterOffset()
void
setOffset(long offset)
void
setPosition(long offset, long recordsToSkipAfterOffset)
void
setPosition(CheckpointedPosition position)
void
setRecordsToSkipAfterOffset(long recordsToSkipAfterOffset)
SplitT
toFileSourceSplit()
Use the current row count as the starting row count to create a new FileSourceSplit.
-
-
-
Constructor Detail
-
FileSourceSplitState
public FileSourceSplitState(SplitT split)
-
-
Method Detail
-
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
public void setPosition(CheckpointedPosition position)
-
toFileSourceSplit
public SplitT toFileSourceSplit()
Use the current row count as the starting row count to create a new FileSourceSplit.
-
-