protected Long getRefreshRequestStartTime(Long existingSeriesStartTime,
      Long existingSeriesEndTime, Long requestedStartTime) {
    Long diff = requestedStartTime - existingSeriesEndTime;
    Long startTime = requestedStartTime;

    if (diff < 0 && requestedStartTime > existingSeriesStartTime) {
      // Regular graph updates
      // Overlapping timeseries data refresh only new part
      // Account for missing data on the trailing edge due to buffering
      startTime = getTimeShiftedStartTime(existingSeriesEndTime);
    }

    LOG.trace("Requesting timeseries data with new startTime = {}", new Date(getMillisecondsTime(startTime)));

    return startTime;
  }
Update cache with new timeseries data
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java