Class TimelineCollectionReader
java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.documentstore.reader.TimelineCollectionReader
This is a generic Collection reader for reading documents belonging to a
CollectionType under a specific DocumentStoreVendor backend.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()fetchEntityTypes(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext context) Fetches the list of Entity Types i.e (YARN_CONTAINER, YARN_APPLICATION_ATTEMPT etc.) for an application Id.readDocument(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext context) Read a document fromDocumentStoreVendorbackend for aCollectionType.readDocuments(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext context, long documentsSize) Read a list of documents fromDocumentStoreVendorbackend for aCollectionType.
-
Constructor Details
-
TimelineCollectionReader
public TimelineCollectionReader(org.apache.hadoop.conf.Configuration conf) throws org.apache.hadoop.yarn.exceptions.YarnException - Throws:
org.apache.hadoop.yarn.exceptions.YarnException
-
-
Method Details
-
readDocument
public TimelineEntityDocument readDocument(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext context) throws IOException Read a document fromDocumentStoreVendorbackend for aCollectionType.- Parameters:
context- of the timeline reader- Returns:
- TimelineEntityDocument as response
- Throws:
IOException- on error while reading
-
readDocuments
public List<TimelineEntityDocument> readDocuments(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext context, long documentsSize) throws IOException Read a list of documents fromDocumentStoreVendorbackend for aCollectionType.- Parameters:
context- of the timeline readerdocumentsSize- to limit- Returns:
- List of TimelineEntityDocument as response
- Throws:
IOException- on error while reading
-
fetchEntityTypes
public Set<String> fetchEntityTypes(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext context) Fetches the list of Entity Types i.e (YARN_CONTAINER, YARN_APPLICATION_ATTEMPT etc.) for an application Id.- Parameters:
context- of the timeline reader- Returns:
- List of EntityTypes as response
-
close
- Throws:
Exception
-