protected static Object getValue(TimelineMetric metric, TemporalInfo temporalInfo) {
    Number[][] dataPoints = getGangliaLikeDatapoints(metric, temporalInfo);

    int length = dataPoints.length;
    if (temporalInfo != null) {
      return length > 0 ? dataPoints : null;
    } else {
      // return the value of the last data point
      return length > 0 ? dataPoints[length - 1][0] : 0;
    }
  }
Get value from the given metric.

@param metric      the metric
@param temporalInfo  indicates whether or not this a temporal metric

@return a range of temporal data or a point in time value if not temporal
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java