Class TimelineDataToRetrieve

java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.reader.TimelineDataToRetrieve

@Private @Unstable public class TimelineDataToRetrieve extends Object
Encapsulates information regarding which data to retrieve for each entity while querying.
Data to retrieve contains the following :
  • confsToRetrieve - Used for deciding which configs to return in response. This is represented as a TimelineFilterList object containing TimelinePrefixFilter objects. 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 contains TimelineReader.Field.CONFIGS or TimelineReader.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 TimelineFilterList object containing TimelinePrefixFilter objects. 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 contains TimelineReader.Field.METRICS or TimelineReader.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 if TimelineReader.Field.ALL is 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 Details

    • DEFAULT_METRICS_LIMIT

      public static final Integer DEFAULT_METRICS_LIMIT
      Default limit of number of metrics to return.
  • Constructor Details

  • Method Details

    • getConfsToRetrieve

      public TimelineFilterList getConfsToRetrieve()
    • setConfsToRetrieve

      public void setConfsToRetrieve(TimelineFilterList confs)
    • getMetricsToRetrieve

      public TimelineFilterList getMetricsToRetrieve()
    • setMetricsToRetrieve

      public void setMetricsToRetrieve(TimelineFilterList metrics)
    • getFieldsToRetrieve

      public EnumSet<TimelineReader.Field> getFieldsToRetrieve()
    • setFieldsToRetrieve

      public void setFieldsToRetrieve(EnumSet<TimelineReader.Field> fields)
    • addFieldsBasedOnConfsAndMetricsToRetrieve

      public void addFieldsBasedOnConfsAndMetricsToRetrieve()
      Adds configs and metrics fields to fieldsToRetrieve(if they are not present) if confsToRetrieve and metricsToRetrieve are specified.
    • getMetricsLimit

      public Integer getMetricsLimit()
    • getMetricsTimeBegin

      public Long getMetricsTimeBegin()
    • getMetricsTimeEnd

      public Long getMetricsTimeEnd()
    • setMetricsLimit

      public void setMetricsLimit(Integer limit)