public class ColumnarRowIterator extends RecyclableIterator<RowData>
RowDatas. The next row is set by
|Constructor and Description|
|Modifier and Type||Method and Description|
Gets the next record from the file, together with its position.
Set number rows in this batch and updates the position.
public ColumnarRowIterator(ColumnarRowData rowData, @Nullable Runnable recycler)
public void set(int num, long recordSkipCount)
num- number rows in this batch.
recordSkipCount- The number of rows that have been returned before this batch.
public void set(int num, long offset, long recordSkipCount)
@Nullable public RecordAndPosition<RowData> next()
The position information returned with the record point to the record AFTER the returned record, because it defines the point where the reading should resume once the current record is emitted. The position information is put in the source's state when the record is emitted. If a checkpoint is taken directly after the record is emitted, the checkpoint must to describe where to resume the source reading from after that record.
Objects returned by this method may be reused by the iterator. By the time that this
method is called again, no object returned from the previous call will be referenced any
more. That makes it possible to have a single
MutableRecordAndPosition object and
return the same instance (with updated record and position) on every call.
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.