@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EndTransactionMarker that = (EndTransactionMarker) o;
        return coordinatorEpoch == that.coordinatorEpoch && type == that.type;
    }
This class represents the control record which is written to the log to indicate the completion
of a transaction. The record key specifies the {@link ControlRecordType control type} and the
value embeds information useful for write validation (for now, just the coordinator epoch).
clients/src/main/java/org/apache/kafka/common/record/EndTransactionMarker.java