Class TimelineStorageUtils
java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.common.TimelineStorageUtils
A bunch of utility functions used across TimelineReader and TimelineWriter.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisIntegralValue(Object obj) Checks if passed object is of integral type(Short/Integer/Long).static booleanmatchConfigFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList configFilters) Matches config filters.static booleanmatchEventFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList eventFilters) Matches event filters.static booleanmatchInfoFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList infoFilters) Matches info filters.static booleanmatchIsRelatedTo(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList isRelatedTo) Matches isrelatedto.static booleanmatchMetricFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList metricFilters) Matches metric filters.static booleanmatchRelatesTo(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList relatesTo) Matches relatesto.
-
Method Details
-
matchRelatesTo
public static boolean matchRelatesTo(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList relatesTo) throws IOException Matches relatesto.- Parameters:
entity- entity which holds relatesto relations.relatesTo- the relations for filtering.- Returns:
- true, if filter matches, false otherwise.
- Throws:
IOException- if an unsupported filter for matching relations is being matched.
-
matchIsRelatedTo
public static boolean matchIsRelatedTo(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList isRelatedTo) throws IOException Matches isrelatedto.- Parameters:
entity- entity which holds isRelatedTo relations.isRelatedTo- the relations for filtering.- Returns:
- true, if filter matches, false otherwise.
- Throws:
IOException- if an unsupported filter for matching relations is being matched.
-
matchConfigFilters
public static boolean matchConfigFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList configFilters) throws IOException Matches config filters.- Parameters:
entity- entity which holds a map of config key-value pairs.configFilters- list of info filters.- Returns:
- a boolean flag to indicate if both match.
- Throws:
IOException- if an unsupported filter for matching config filters is being matched.
-
matchInfoFilters
public static boolean matchInfoFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList infoFilters) throws IOException Matches info filters.- Parameters:
entity- entity which holds a map of info key-value pairs.infoFilters- list of info filters.- Returns:
- a boolean flag to indicate if both match.
- Throws:
IOException- if an unsupported filter for matching info filters is being matched.
-
matchEventFilters
public static boolean matchEventFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList eventFilters) throws IOException Matches event filters.- Parameters:
entity- entity which holds a set of event objects.eventFilters- the set of event Ids for filtering.- Returns:
- a boolean flag to indicate if both match.
- Throws:
IOException- if an unsupported filter for matching event filters is being matched.
-
matchMetricFilters
public static boolean matchMetricFilters(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity, TimelineFilterList metricFilters) throws IOException Matches metric filters.- Parameters:
entity- entity which holds a set of metric objects.metricFilters- list of metric filters.- Returns:
- a boolean flag to indicate if both match.
- Throws:
IOException- if an unsupported filter for matching metric filters is being matched.
-
isIntegralValue
Checks if passed object is of integral type(Short/Integer/Long).- Parameters:
obj- Object to be checked.- Returns:
- true if object passed is of type Short or Integer or Long, false otherwise.
-