Class TimelineDataToRetrieve
java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.reader.TimelineDataToRetrieve
Encapsulates information regarding which data to retrieve for each entity
while querying.
Data to retrieve contains the following :
Data to retrieve contains the following :
- confsToRetrieve - Used for deciding which configs to return
in response. This is represented as a
TimelineFilterListobject containingTimelinePrefixFilterobjects. These can either be exact config keys' or prefixes which are then compared against config keys' to decide configs(inside entities) to return in response. If null or empty, all configurations will be fetched if fieldsToRetrieve containsTimelineReader.Field.CONFIGSorTimelineReader.Field.ALL. This should not be confused with configFilters which is used to decide which entities to return instead. - metricsToRetrieve - Used for deciding which metrics to return
in response. This is represented as a
TimelineFilterListobject containingTimelinePrefixFilterobjects. These can either be exact metric ids' or prefixes which are then compared against metric ids' to decide metrics(inside entities) to return in response. If null or empty, all metrics will be fetched if fieldsToRetrieve containsTimelineReader.Field.METRICSorTimelineReader.Field.ALL. This should not be confused with metricFilters which is used to decide which entities to return instead. - fieldsToRetrieve - Specifies which fields of the entity
object to retrieve, see
TimelineReader.Field. If null, retrieves 3 fields, namely entity id, entity type and entity created time. All fields will be returned ifTimelineReader.Field.ALLis specified. - metricsLimit - If fieldsToRetrieve contains METRICS/ALL or metricsToRetrieve is specified, this limit defines an upper limit to the number of metrics to return. This parameter is ignored if METRICS are not to be fetched.
- metricsTimeStart - Metric values before this timestamp would not be retrieved. If null or <0, defaults to 0.
- metricsTimeEnd - Metric values after this timestamp would not
be retrieved. If null or <0, defaults to
Long.MAX_VALUE.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerDefault limit of number of metrics to return. -
Constructor Summary
ConstructorsConstructorDescriptionTimelineDataToRetrieve(TimelineFilterList confs, TimelineFilterList metrics, EnumSet<TimelineReader.Field> fields, Integer limitForMetrics, Long metricTimeBegin, Long metricTimeEnd) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds configs and metrics fields to fieldsToRetrieve(if they are not present) if confsToRetrieve and metricsToRetrieve are specified.voidvoidvoidsetMetricsLimit(Integer limit) voidsetMetricsToRetrieve(TimelineFilterList metrics)
-
Field Details
-
DEFAULT_METRICS_LIMIT
Default limit of number of metrics to return.
-
-
Constructor Details
-
TimelineDataToRetrieve
public TimelineDataToRetrieve() -
TimelineDataToRetrieve
public TimelineDataToRetrieve(TimelineFilterList confs, TimelineFilterList metrics, EnumSet<TimelineReader.Field> fields, Integer limitForMetrics, Long metricTimeBegin, Long metricTimeEnd)
-
-
Method Details
-
getConfsToRetrieve
-
setConfsToRetrieve
-
getMetricsToRetrieve
-
setMetricsToRetrieve
-
getFieldsToRetrieve
-
setFieldsToRetrieve
-
addFieldsBasedOnConfsAndMetricsToRetrieve
public void addFieldsBasedOnConfsAndMetricsToRetrieve()Adds configs and metrics fields to fieldsToRetrieve(if they are not present) if confsToRetrieve and metricsToRetrieve are specified. -
getMetricsLimit
-
getMetricsTimeBegin
-
getMetricsTimeEnd
-
setMetricsLimit
-