private List<TimelineMetric> getFilteredMetricList(List<SingleMetric> metrics) {
    final List<TimelineMetric> metricList = new ArrayList<>();
    for (SingleMetric metric : metrics) {

      String metricName = metric.getMetricName();
      Double value = metric.getValue();

      TimelineMetric timelineMetric = createTimelineMetric(metric.getTimestamp(), AMBARI_SERVER_APP_ID, metricName, value);
      timelineMetricsCache.putTimelineMetric(timelineMetric, false);
      TimelineMetric cachedMetric = timelineMetricsCache.getTimelineMetric(metricName);

      if (cachedMetric != null) {
        metricList.add(cachedMetric);
      }
    }
    return metricList;
  }
Get hostname used for calculating write shard.

@return String "host1"
ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java