@Override
  public int hashCode() {
    int result = metricNames.hashCode();
    result = 31 * result + appId.hashCode();
    result = 31 * result + (hostNames != null ? hostNames.hashCode() : 0);
    return result;
  }
Set spec string.
@param spec Request Uri
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineAppMetricCacheKey.java