@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Batch<?> batch = (Batch<?>) o;
        return baseOffset == batch.baseOffset &&
            epoch == batch.epoch &&
            appendTimestamp == batch.appendTimestamp &&
            sizeInBytes == batch.sizeInBytes &&
            lastOffset == batch.lastOffset &&
            Objects.equals(records, batch.records) &&
            Objects.equals(controlRecords, batch.controlRecords);
    }
The number of bytes used by this batch.
raft/src/main/java/org/apache/kafka/raft/Batch.java