use of io.prestosql.orc.checkpoint.LongStreamV2Checkpoint in project hetu-core by openlookeng.
the class LongInputStreamV2 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());
}
}
use of io.prestosql.orc.checkpoint.LongStreamV2Checkpoint in project hetu-core by openlookeng.
the class LongOutputStreamV2 method recordCheckpoint.
@Override
public void recordCheckpoint() {
checkState(!closed);
checkpoints.add(new LongStreamV2Checkpoint(numLiterals, buffer.getCheckpoint()));
}
Aggregations