@Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            TimestampAndOffset that = (TimestampAndOffset) o;
            return timestamp == that.timestamp &&
                    offset == that.offset &&
                    Objects.equals(leaderEpoch, that.leaderEpoch);
        }
Open a channel for the given file
For windows NTFS and some old LINUX file system, set preallocate to true and initFileSize
with one value (for example 512 * 1025 *1024 ) can improve the kafka produce performance.
@param file File path
@param mutable mutable
@param fileAlreadyExists File already exists or not
@param initFileSize The size used for pre allocate file, for example 512 * 1025 *1024
@param preallocate Pre-allocate file or not, gotten from configuration.
clients/src/main/java/org/apache/kafka/common/record/FileRecords.java