@PublicEvolving public final class FileSourceSplitState<SplitT extends FileSourceSplit> extends Object
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 and Description |
---|
FileSourceSplitState(SplitT split) |
Modifier and Type | Method and Description |
---|---|
long |
getOffset() |
long |
getRecordsToSkipAfterOffset() |
void |
setOffset(long offset) |
void |
setPosition(CheckpointedPosition position) |
void |
setPosition(long offset,
long recordsToSkipAfterOffset) |
void |
setRecordsToSkipAfterOffset(long recordsToSkipAfterOffset) |
SplitT |
toFileSourceSplit()
Use the current row count as the starting row count to create a new FileSourceSplit.
|
public FileSourceSplitState(SplitT split)
public long getOffset()
public long getRecordsToSkipAfterOffset()
public void setOffset(long offset)
public void setRecordsToSkipAfterOffset(long recordsToSkipAfterOffset)
public void setPosition(long offset, long recordsToSkipAfterOffset)
public void setPosition(CheckpointedPosition position)
public SplitT toFileSourceSplit()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.