use of com.facebook.presto.orc.checkpoint.LongStreamV2Checkpoint in project presto by prestodb.
the class LongStreamV2 method seekToCheckpoint.
@Override
public void seekToCheckpoint(LongStreamCheckpoint checkpoint) throws IOException {
LongStreamV2Checkpoint v2Checkpoint = (LongStreamV2Checkpoint) checkpoint;
// if the checkpoint is within the current buffer, just adjust the pointer
if (lastReadInputCheckpoint == v2Checkpoint.getInputStreamCheckpoint() && v2Checkpoint.getOffset() <= numLiterals) {
used = v2Checkpoint.getOffset();
} else {
// otherwise, discard the buffer and start over
input.seekToCheckpoint(v2Checkpoint.getInputStreamCheckpoint());
numLiterals = 0;
used = 0;
skip(v2Checkpoint.getOffset());
}
}
Aggregations