@Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    ResolvedKerberosPrincipal principal1 = (ResolvedKerberosPrincipal) o;
    return isService == principal1.isService &&
      Objects.equal(hostId, principal1.hostId) &&
      Objects.equal(hostName, principal1.hostName) &&
      Objects.equal(principal, principal1.principal) &&
      Objects.equal(cacheFile, principal1.cacheFile) &&
      Objects.equal(serviceMapping, principal1.serviceMapping) &&
      Objects.equal(keytabPath, principal1.keytabPath);
  }
Class that represents principal and it info(host, keytab path, service and component mapping).
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/stageutils/ResolvedKerberosPrincipal.java