Class TimelineEntityFilters

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

@Private @Unstable public final class TimelineEntityFilters extends Object
Encapsulates information regarding the filters to apply while querying. These filters restrict the number of entities to return.
Filters contain the following :
  • limit - A limit on the number of entities to return. If null or < 0, defaults to DEFAULT_LIMIT. The maximum possible value for limit can be Long.MAX_VALUE.
  • createdTimeBegin - Matched entities should not be created before this timestamp. If null or <=0, defaults to 0.
  • createdTimeEnd - Matched entities should not be created after this timestamp. If null or <=0, defaults to Long.MAX_VALUE.
  • relatesTo - Matched entities should or should not relate to given entities depending on what's specified in the filter. The entities in relatesTo are identified by entity type and id. This is represented as a TimelineFilterList object containing TimelineKeyValuesFilter objects, each of which contains a set of values for a key and the comparison operator (equals/not equals). The key which represents the entity type is a string and values are a set of entity identifiers (also string). As it is a filter list, relatesTo can be evaluated with logical AND/OR and we can create a hierarchy of these TimelineKeyValuesFilter objects. If null or empty, the relations are not matched.
  • isRelatedTo - Matched entities should or should not be related to given entities depending on what's specified in the filter. The entities in isRelatedTo are identified by entity type and id. This is represented as a TimelineFilterList object containing TimelineKeyValuesFilter objects, each of which contains a set of values for a key and the comparison operator (equals/not equals). The key which represents the entity type is a string and values are a set of entity identifiers (also string). As it is a filter list, relatesTo can be evaluated with logical AND/OR and we can create a hierarchy of these TimelineKeyValuesFilter objects. If null or empty, the relations are not matched.
  • infoFilters - Matched entities should have exact matches to the given info and should be either equal or not equal to given value depending on what's specified in the filter. This is represented as a TimelineFilterList object containing TimelineKeyValueFilter objects, each of which contains key-value pairs with a comparison operator (equals/not equals). The key which represents the info key is a string but value can be any object. As it is a filter list, info filters can be evaluated with logical AND/OR and we can create a hierarchy of these key-value pairs. If null or empty, the filter is not applied.
  • configFilters - Matched entities should have exact matches to the given configurations and should be either equal or not equal to given value depending on what's specified in the filter. This is represented as a TimelineFilterList object containing TimelineKeyValueFilter objects, each of which contains key-value pairs with a comparison operator (equals/not equals). Both key (which represents config name) and value (which is config value) are strings. As it is a filter list, config filters can be evaluated with logical AND/OR and we can create a hierarchy of these TimelineKeyValueFilter objects. If null or empty, the filter is not applied.
  • metricFilters - Matched entities should contain the given metrics and satisfy the specified relation with the value. This is represented as a TimelineFilterList object containing TimelineCompareFilter objects, each of which contains key-value pairs along with the specified relational/comparison operator represented by TimelineCompareOp. The key is a string and value is integer (Short/Integer/Long). As it is a filter list, metric filters can be evaluated with logical AND/OR and we can create a hierarchy of these TimelineCompareFilter objects. If null or empty, the filter is not applied.
  • eventFilters - Matched entities should contain or not contain the given events. This is represented as a TimelineFilterList object containing TimelineExistsFilter objects, each of which contains a value which must or must not exist depending on comparison operator specified in the filter. For event filters, the value represents a event id. As it is a filter list, event filters can be evaluated with logical AND/OR and we can create a hierarchy of these TimelineExistsFilter objects. If null or empty, the filter is not applied.
  • fromId - If specified, retrieve the next set of entities from the given fromId. The set of entities retrieved is inclusive of specified fromId. fromId should be taken from the value associated with FROM_ID info key in entity response which was sent earlier.
  • Field Details

    • DEFAULT_LIMIT

      public static final long DEFAULT_LIMIT
      Default limit of number of entities to return for getEntities API.
      See Also:
  • Method Details