@Override
    public Segment getRecordSeg(final long offset) throws IOException {
        Segment tmpSeg = this.findSegment(offset);
        if (tmpSeg != null && tmpSeg.isExpired()) {
            return null;
        }
        return tmpSeg;
    }
Return segment by the given offset.

@param offset     the position to search
@return           the segment included the position
@throws IOException  the exception while searching
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java