public int relativeOffset(long offset) {
        OptionalInt relativeOffset = toRelative(offset);
        return relativeOffset.orElseThrow(() -> new IndexOffsetOverflowException(
            "Integer overflow for offset: " + offset + " (" + file.getAbsoluteFile() + ")"));
    }
Get offset relative to base offset of this index
@throws IndexOffsetOverflowException
storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java