@Override
    protected byte[] onDataGet(final long logIndex, final byte[] value) throws IOException {
        if (value == null || value.length != LOCATION_METADATA_SIZE) {
            return value;
        }

        int offset = 0;
        for (; offset < SegmentFile.RECORD_MAGIC_BYTES_SIZE; offset++) {
            if (value[offset] != SegmentFile.RECORD_MAGIC_BYTES[offset]) {
                return value;
            }
        }

        // skip reserved
        offset += 2;

        final long firstLogIndex = Bits.getLong(value, offset);
        final int pos = Bits.getInt(value, offset + 8);
        final SegmentFile file = binarySearchFileByFirstLogIndex(firstLogIndex);
        if (file == null) {
            return null;
        }
        return file.read(logIndex, pos);
    }
Encode segment file firstLogIndex(fileName) and position to a byte array in the format of:
<ul>
 <li> magic bytes(2 B)</li>
 <li> reserved (2 B)</li>
 <li> firstLogIndex(8 B)</li>
 <li> wrote position(4 B)</li>
</ul>
@param firstLogIndex the first log index
@param pos           the wrote position
@return segment info
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/RocksDBSegmentLogStorage.java