@Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!super.equals(obj)) {
      return false;
    }

    if (getClass() != obj.getClass()) {
      return false;
    }

    MetricSource other = (MetricSource) obj;
    return Objects.equals(gangliaInfo, other.gangliaInfo) &&
      Objects.equals(uri, other.uri) &&
      Objects.equals(jmxInfo, other.jmxInfo);
  }
@return the uri info, which may include port information
ambari-server/src/main/java/org/apache/ambari/server/state/alert/MetricSource.java