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

    TimelineAppMetricCacheKey that = (TimelineAppMetricCacheKey) o;

    if (!metricNames.equals(that.metricNames)) return false;
    if (!appId.equals(that.appId)) return false;
    return !(hostNames != null ? !hostNames.equals(that.hostNames) : that.hostNames != null);

  }
Set spec string.
@param spec Request Uri
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineAppMetricCacheKey.java