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

    CancelCommand that = (CancelCommand) o;

    if (targetTaskId != that.targetTaskId) return false;
    return reason != null ? reason.equals(that.reason) : that.reason == null;
  }
Command to report the status of a list of services in roles.
ambari-server/src/main/java/org/apache/ambari/server/agent/CancelCommand.java