public long largestTimestamp() throws IOException {
        long maxTimestampSoFar = maxTimestampSoFar();
        if (maxTimestampSoFar >= 0)
            return maxTimestampSoFar;
        return lastModified();
    }
The largest timestamp this segment contains.
storage/src/main/java/org/apache/kafka/storage/internals/log/LogSegment.java