use of io.prestosql.orc.checkpoint.LongStreamV1Checkpoint in project hetu-core by openlookeng.
the class LongInputStreamV1 method seekToCheckpoint.
@Override
public void seekToCheckpoint(LongStreamCheckpoint checkpoint) throws IOException {
LongStreamV1Checkpoint v1Checkpoint = (LongStreamV1Checkpoint) checkpoint;
// if the checkpoint is within the current buffer, just adjust the pointer
if (lastReadInputCheckpoint == v1Checkpoint.getInputStreamCheckpoint() && v1Checkpoint.getOffset() <= numLiterals) {
used = v1Checkpoint.getOffset();
} else {
// otherwise, discard the buffer and start over
input.seekToCheckpoint(v1Checkpoint.getInputStreamCheckpoint());
numLiterals = 0;
used = 0;
skip(v1Checkpoint.getOffset());
}
}
use of io.prestosql.orc.checkpoint.LongStreamV1Checkpoint in project hetu-core by openlookeng.
the class LongOutputStreamV1 method recordCheckpoint.
@Override
public void recordCheckpoint() {
checkState(!closed);
checkpoints.add(new LongStreamV1Checkpoint(size, buffer.getCheckpoint()));
}
Aggregations