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

    QueryIdentifier that = (QueryIdentifier) o;

    if (dagIdentifier != that.dagIdentifier) {
      return false;
    }
    return appIdentifier.equals(that.appIdentifier);

  }
An identifier for a query, which is unique.

This is based on the AppId and dagId.

At the moment, It's possible for Hive to use the same "hive.query.id" if a single query
is split into stages - which prevents this identifier being used as the unique id.

Not exposing getters to allow this to evolve - i.e. retain the uniqueness constraint.
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/QueryIdentifier.java