@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PartitionData that = (PartitionData) o;
        return Objects.equals(partition, that.partition) &&
                Objects.equals(stateEpoch, that.stateEpoch) &&
                Objects.equals(startOffset, that.startOffset) &&
                Objects.equals(errorCode, that.errorCode) &&
                Objects.equals(errorMessage, that.errorMessage) &&
                Objects.equals(leaderEpoch, that.leaderEpoch) &&
                Objects.equals(stateBatches, that.stateBatches);
    }
This class contains the data for a partition in the interface to {@link Persister}. The various interfaces
reflect the ways in which a subset of the data can be accessed for different purposes.
server-common/src/main/java/org/apache/kafka/server/group/share/PartitionData.java