Class RecordAndPosition<T>
- java.lang.Object
-
- org.apache.iceberg.flink.source.reader.RecordAndPosition<T>
-
@Internal public class RecordAndPosition<T> extends java.lang.ObjectA record along with the reader position to be stored in the checkpoint.The position defines the point in the reader AFTER the record. Record processing and updating checkpointed state happens atomically. The position points to where the reader should resume after this record is processed.
This mutable object is useful in cases where only one instance of a
RecordAndPositionis needed at a time. Then the same instance of RecordAndPosition can be reused.
-
-
Constructor Summary
Constructors Constructor Description RecordAndPosition()RecordAndPosition(T record, int fileOffset, long recordOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfileOffset()Trecord()voidrecord(T nextRecord)Sets the next record of a sequence.longrecordOffset()voidset(T newRecord, int newFileOffset, long newRecordOffset)Updates the record and position in this object.java.lang.StringtoString()
-
-
-
Constructor Detail
-
RecordAndPosition
public RecordAndPosition(T record, int fileOffset, long recordOffset)
-
RecordAndPosition
public RecordAndPosition()
-
-
Method Detail
-
record
public T record()
-
fileOffset
public int fileOffset()
-
recordOffset
public long recordOffset()
-
set
public void set(T newRecord, int newFileOffset, long newRecordOffset)
Updates the record and position in this object.
-
record
public void record(T nextRecord)
Sets the next record of a sequence. This increments therecordOffsetby one.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-