@InterfaceAudience.Public @InterfaceStability.Unstable public class TimelineMetric extends Object
| Constructor and Description | 
|---|
| TimelineMetric() | 
| TimelineMetric(org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric.Type type) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addValue(long timestamp,
        Number value) | 
| void | addValues(Map<Long,Number> vals) | 
| static TimelineMetric | aggregateTo(TimelineMetric incomingMetric,
           TimelineMetric baseAggregatedMetric)Aggregate an incoming metric to the base aggregated metric with the given
 operation state in a stateless fashion. | 
| static TimelineMetric | aggregateTo(TimelineMetric incomingMetric,
           TimelineMetric baseAggregatedMetric,
           Map<Object,Object> state)Aggregate an incoming metric to the base aggregated metric with the given
 operation state. | 
| boolean | equals(Object o) | 
| String | getId() | 
| static TimelineMetric | getLatestSingleValueMetric(TimelineMetric metric)Get the latest timeline metric as single value type. | 
| org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetricOperation | getRealtimeAggregationOp()Get the real time aggregation operation of this metric. | 
| long | getSingleDataTimestamp()Get single data timestamp of the metric. | 
| Number | getSingleDataValue()Get single data value of the metric. | 
| org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric.Type | getType() | 
| Map<Long,Number> | getValues() | 
| int | hashCode() | 
| boolean | isValid() | 
| void | setId(String metricId) | 
| void | setRealtimeAggregationOp(org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetricOperation op)Set the real time aggregation operation of this metric. | 
| void | setType(org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric.Type metricType) | 
| void | setValues(Map<Long,Number> vals) | 
| String | toString() | 
public TimelineMetric()
public TimelineMetric(org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric.Type type)
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric.Type getType()
public void setType(org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric.Type metricType)
public String getId()
public void setId(String metricId)
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetricOperation getRealtimeAggregationOp()
public void setRealtimeAggregationOp(org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetricOperation op)
op - A timeline metric operation that the metric should perform on
           real time aggregationspublic void addValue(long timestamp,
                     Number value)
public boolean isValid()
public static TimelineMetric getLatestSingleValueMetric(TimelineMetric metric)
metric - Incoming timeline metricpublic long getSingleDataTimestamp()
public Number getSingleDataValue()
public static TimelineMetric aggregateTo(TimelineMetric incomingMetric, TimelineMetric baseAggregatedMetric)
incomingMetric - Incoming timeline metric to aggregatebaseAggregatedMetric - Base timeline metricpublic static TimelineMetric aggregateTo(TimelineMetric incomingMetric, TimelineMetric baseAggregatedMetric, Map<Object,Object> state)
incomingMetric - Incoming timeline metric to aggregatebaseAggregatedMetric - Base timeline metricstate - Operation stateCopyright © 2023 Apache Software Foundation. All rights reserved.