java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.documentstore.reader.TimelineCollectionReader

public class TimelineCollectionReader extends Object
This is a generic Collection reader for reading documents belonging to a CollectionType under a specific DocumentStoreVendor backend.
  • 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 from DocumentStoreVendor backend for a CollectionType.
      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 from DocumentStoreVendor backend for a CollectionType.
      Parameters:
      context - of the timeline reader
      documentsSize - 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

      public void close() throws Exception
      Throws:
      Exception