@InterfaceAudience.Private
@InterfaceStability.Unstable
public interface TimelineReader
extends org.apache.hadoop.service.Service
Modifier and Type | Interface and Description |
---|---|
static class |
TimelineReader.Field
Possible fields to retrieve for
getEntities(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext, org.apache.hadoop.yarn.server.timelineservice.reader.TimelineEntityFilters, org.apache.hadoop.yarn.server.timelineservice.reader.TimelineDataToRetrieve) and
getEntity(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext, org.apache.hadoop.yarn.server.timelineservice.reader.TimelineDataToRetrieve) . |
Modifier and Type | Method and Description |
---|---|
Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity> |
getEntities(TimelineReaderContext context,
TimelineEntityFilters filters,
TimelineDataToRetrieve dataToRetrieve)
The API to search for a set of entities of the given entity type in
the scope of the given context which matches the given predicates.
|
org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity |
getEntity(TimelineReaderContext context,
TimelineDataToRetrieve dataToRetrieve)
The API to fetch the single entity given the identifier(depending on
the entity type) in the scope of the given context.
|
Set<String> |
getEntityTypes(TimelineReaderContext context)
The API to list all available entity types of the given context.
|
org.apache.hadoop.yarn.api.records.timeline.TimelineHealth |
getHealthStatus()
Check if reader connection is working properly.
|
org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getEntity(TimelineReaderContext context, TimelineDataToRetrieve dataToRetrieve) throws IOException
The API to fetch the single entity given the identifier(depending on the entity type) in the scope of the given context.
context
- Context which defines the scope in which query has to be
made. Use getters of TimelineReaderContext
to fetch context
fields. Context contains the following :dataToRetrieve
- Specifies which data to retrieve for the entity. Use
getters of TimelineDataToRetrieve class to fetch dataToRetrieve
fields. All the dataToRetrieve fields are optional. Refer to
TimelineDataToRetrieve
for details.IOException
- if there is an exception encountered while fetching
entity from backend storage.Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity> getEntities(TimelineReaderContext context, TimelineEntityFilters filters, TimelineDataToRetrieve dataToRetrieve) throws IOException
The API to search for a set of entities of the given entity type in the scope of the given context which matches the given predicates. The predicates include the created time window, limit to number of entities to be returned, and the entities can be filtered by checking whether they contain the given info/configs entries in the form of key/value pairs, given metrics in the form of metricsIds and its relation with metric values, given events in the form of the Ids, and whether they relate to/are related to other entities. For those parameters which have multiple entries, the qualified entity needs to meet all or them.
context
- Context which defines the scope in which query has to be
made. Use getters of TimelineReaderContext
to fetch context
fields. Context contains the following :filters
- Specifies filters which restrict the number of entities
to return. Use getters of TimelineEntityFilters class to fetch
various filters. All the filters are optional. Refer to
TimelineEntityFilters
for details.dataToRetrieve
- Specifies which data to retrieve for each entity. Use
getters of TimelineDataToRetrieve class to fetch dataToRetrieve
fields. All the dataToRetrieve fields are optional. Refer to
TimelineDataToRetrieve
for details.IOException
- if there is an exception encountered while fetching
entity from backend storage.Set<String> getEntityTypes(TimelineReaderContext context) throws IOException
context
- A context defines the scope of this query. The incoming
context should contain at least the cluster id and application id.IOException
- if an exception occurred while listing from backend
storage.org.apache.hadoop.yarn.api.records.timeline.TimelineHealth getHealthStatus()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.