@Override
  public boolean equals(Object other) {
    if (!(other instanceof ExecutionCommand)) {
      return false;
    }
    ExecutionCommand o = (ExecutionCommand) other;
    return (commandId.equals(o.commandId) &&
            hostname.equals(o.hostname) &&
            role.equals(o.role) &&
            roleCommand.equals(o.roleCommand));
  }
Sets the request and stage on this command. The {@code commandId} field is
automatically constructed from these as requestId-stageId.

@param requestId
         the ID of the execution request.
@param stageId
         the ID of the stage request.
ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java