java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.documentstore.lib.DocumentStoreFactory

public final class DocumentStoreFactory extends Object
Factory methods for instantiating a timeline Document Store reader or writer. Based on the DocumentStoreVendor that is configured, appropriate reader or writer would be instantiated.
  • Method Details

    • createDocumentStoreWriter

      public static <Document extends TimelineDocument> DocumentStoreWriter<Document> createDocumentStoreWriter(org.apache.hadoop.conf.Configuration conf) throws org.apache.hadoop.yarn.exceptions.YarnException
      Creates a DocumentStoreWriter for a DocumentStoreVendor.
      Type Parameters:
      Document - type of Document for which the writer has to be created, i.e TimelineEntityDocument, FlowActivityDocument etc
      Parameters:
      conf - for creating client connection
      Returns:
      document store writer
      Throws:
      DocumentStoreNotSupportedException - if there is no implementation for a configured DocumentStoreVendor or unknown DocumentStoreVendor is configured.
      org.apache.hadoop.yarn.exceptions.YarnException - if the required configs for DocumentStore is missing.
    • createDocumentStoreReader

      public static <Document extends TimelineDocument> DocumentStoreReader<Document> createDocumentStoreReader(org.apache.hadoop.conf.Configuration conf) throws org.apache.hadoop.yarn.exceptions.YarnException
      Creates a DocumentStoreReader for a DocumentStoreVendor.
      Type Parameters:
      Document - type of Document for which the writer has to be created, i.e TimelineEntityDocument, FlowActivityDocument etc
      Parameters:
      conf - for creating client connection
      Returns:
      document store reader
      Throws:
      DocumentStoreNotSupportedException - if there is no implementation for a configured DocumentStoreVendor or unknown DocumentStoreVendor is configured.
      org.apache.hadoop.yarn.exceptions.YarnException - if the required configs for DocumentStore is missing.