stream/distributedlog/io/dlfs/src/main/java/org/apache/distributedlog/fs/DLInputStream.java [37:85]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static final long REOPEN_READER_SKIP_BYTES = 4 * 1024 * 1024; // 4MB

    private static class RecordStream {

        private final InputStream payloadStream;
        private final LogRecordWithDLSN record;

        RecordStream(LogRecordWithDLSN record) {
            checkNotNull(record);

            this.record = record;
            this.payloadStream = record.getPayLoadInputStream();
        }

    }

    private static RecordStream nextRecordStream(LogReader reader) throws IOException {
        LogRecordWithDLSN record = reader.readNext(false);
        if (null != record) {
            return new RecordStream(record);
        }
        return null;
    }

    private final DistributedLogManager dlm;
    private LogReader reader;
    private long pos;
    private long lastPos;
    private RecordStream currentRecord = null;

    DLInputStream(DistributedLogManager dlm,
                  LogReader reader,
                  long startPos)
            throws IOException {
        this.dlm = dlm;
        this.reader = reader;
        this.pos = startPos;
        this.lastPos = readEndPos();
        seek(startPos);
    }

    @Override
    public void close() throws IOException {
        reader.close();
        dlm.close();
    }

    private long readEndPos() throws IOException {
        return dlm.getLastTxId();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/rocksdb/checkpoint/dlog/DLInputStream.java [36:84]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static final long REOPEN_READER_SKIP_BYTES = 4 * 1024 * 1024; // 4MB

    private static class RecordStream {

        private final InputStream payloadStream;
        private final LogRecordWithDLSN record;

        RecordStream(LogRecordWithDLSN record) {
            checkNotNull(record);

            this.record = record;
            this.payloadStream = record.getPayLoadInputStream();
        }

    }

    private static RecordStream nextRecordStream(LogReader reader) throws IOException {
        LogRecordWithDLSN record = reader.readNext(false);
        if (null != record) {
            return new RecordStream(record);
        }
        return null;
    }

    private final DistributedLogManager dlm;
    private LogReader reader;
    private long pos;
    private long lastPos;
    private RecordStream currentRecord = null;

    DLInputStream(DistributedLogManager dlm,
                  LogReader reader,
                  long startPos)
            throws IOException {
        this.dlm = dlm;
        this.reader = reader;
        this.pos = startPos;
        this.lastPos = readEndPos();
        seek(startPos);
    }

    @Override
    public void close() throws IOException {
        reader.close();
        dlm.close();
    }

    private long readEndPos() throws IOException {
        return dlm.getLastTxId();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



