Class LevelDBCacheTimelineStore

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.timeline.LevelDBCacheTimelineStore
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.server.timeline.TimelineReader, org.apache.hadoop.yarn.server.timeline.TimelineStore, org.apache.hadoop.yarn.server.timeline.TimelineWriter

@Private @Unstable public class LevelDBCacheTimelineStore extends org.apache.hadoop.service.AbstractService
LevelDB implementation of KeyValueBasedTimelineStore. This implementation stores the entity hash map into a LevelDB instance. There are two partitions of the key space. One partition is to store a entity id to start time mapping: i!ENTITY_ID!ENTITY_TYPE to ENTITY_START_TIME The other partition is to store the actual data: e!START_TIME!ENTITY_ID!ENTITY_TYPE to ENTITY_BYTES This storage does not have any garbage collection mechanism, and is designed mainly for caching usages.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE

    Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.server.timeline.TimelineReader

    org.apache.hadoop.yarn.server.timeline.TimelineReader.Field

    Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.server.timeline.TimelineStore

    org.apache.hadoop.yarn.server.timeline.TimelineStore.SystemFilter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<String,org.apache.hadoop.yarn.api.records.timeline.TimelineDomain>
     
    protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<String,Set<org.apache.hadoop.yarn.api.records.timeline.TimelineDomain>>
     
    protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<org.apache.hadoop.yarn.server.timeline.EntityIdentifier,org.apache.hadoop.yarn.api.records.timeline.TimelineEntity>
     
    protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<org.apache.hadoop.yarn.server.timeline.EntityIdentifier,Long>
     

    Fields inherited from interface org.apache.hadoop.yarn.server.timeline.TimelineReader

    DEFAULT_LIMIT
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.yarn.api.records.timeline.TimelineDomain
     
    org.apache.hadoop.yarn.api.records.timeline.TimelineDomains
     
    org.apache.hadoop.yarn.api.records.timeline.TimelineEntities
    getEntities(String arg0, Long arg1, Long arg2, Long arg3, String arg4, Long arg5, org.apache.hadoop.yarn.server.timeline.NameValuePair arg6, Collection<org.apache.hadoop.yarn.server.timeline.NameValuePair> arg7, EnumSet<org.apache.hadoop.yarn.server.timeline.TimelineReader.Field> arg8, org.apache.hadoop.yarn.server.timeline.TimelineDataManager.CheckAcl arg9)
     
    org.apache.hadoop.yarn.api.records.timeline.TimelineEntity
    getEntity(String arg0, String arg1, EnumSet<org.apache.hadoop.yarn.server.timeline.TimelineReader.Field> arg2)
     
    org.apache.hadoop.yarn.api.records.timeline.TimelineEvents
    getEntityTimelines(String arg0, SortedSet<String> arg1, Long arg2, Long arg3, Long arg4, Set<String> arg5)
     
    boolean
     
    void
    put(org.apache.hadoop.yarn.api.records.timeline.TimelineDomain arg0)
     
    org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponse
    put(org.apache.hadoop.yarn.api.records.timeline.TimelineEntities arg0)
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     

    Methods inherited from class org.apache.hadoop.service.AbstractService

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.hadoop.service.Service

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
  • Field Details

    • entities

      protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<org.apache.hadoop.yarn.server.timeline.EntityIdentifier,org.apache.hadoop.yarn.api.records.timeline.TimelineEntity> entities
    • entityInsertTimes

      protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<org.apache.hadoop.yarn.server.timeline.EntityIdentifier,Long> entityInsertTimes
    • domainById

      protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<String,org.apache.hadoop.yarn.api.records.timeline.TimelineDomain> domainById
    • domainsByOwner

      protected org.apache.hadoop.yarn.server.timeline.TimelineStoreMapAdapter<String,Set<org.apache.hadoop.yarn.api.records.timeline.TimelineDomain>> domainsByOwner
  • Constructor Details

    • LevelDBCacheTimelineStore

      public LevelDBCacheTimelineStore(String id, String name)
    • LevelDBCacheTimelineStore

      public LevelDBCacheTimelineStore(String id)
    • LevelDBCacheTimelineStore

      public LevelDBCacheTimelineStore()
  • Method Details

    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • serviceStop

      protected void serviceStop() throws Exception
      Throws:
      Exception
    • getServiceStopped

      public boolean getServiceStopped()
    • getEntities

      public org.apache.hadoop.yarn.api.records.timeline.TimelineEntities getEntities(String arg0, Long arg1, Long arg2, Long arg3, String arg4, Long arg5, org.apache.hadoop.yarn.server.timeline.NameValuePair arg6, Collection<org.apache.hadoop.yarn.server.timeline.NameValuePair> arg7, EnumSet<org.apache.hadoop.yarn.server.timeline.TimelineReader.Field> arg8, org.apache.hadoop.yarn.server.timeline.TimelineDataManager.CheckAcl arg9) throws IOException
      Specified by:
      getEntities in interface org.apache.hadoop.yarn.server.timeline.TimelineReader
      Throws:
      IOException
    • getEntity

      public org.apache.hadoop.yarn.api.records.timeline.TimelineEntity getEntity(String arg0, String arg1, EnumSet<org.apache.hadoop.yarn.server.timeline.TimelineReader.Field> arg2)
      Specified by:
      getEntity in interface org.apache.hadoop.yarn.server.timeline.TimelineReader
    • getEntityTimelines

      public org.apache.hadoop.yarn.api.records.timeline.TimelineEvents getEntityTimelines(String arg0, SortedSet<String> arg1, Long arg2, Long arg3, Long arg4, Set<String> arg5)
      Specified by:
      getEntityTimelines in interface org.apache.hadoop.yarn.server.timeline.TimelineReader
    • getDomain

      public org.apache.hadoop.yarn.api.records.timeline.TimelineDomain getDomain(String arg0) throws IOException
      Specified by:
      getDomain in interface org.apache.hadoop.yarn.server.timeline.TimelineReader
      Throws:
      IOException
    • getDomains

      public org.apache.hadoop.yarn.api.records.timeline.TimelineDomains getDomains(String arg0) throws IOException
      Specified by:
      getDomains in interface org.apache.hadoop.yarn.server.timeline.TimelineReader
      Throws:
      IOException
    • put

      public org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponse put(org.apache.hadoop.yarn.api.records.timeline.TimelineEntities arg0)
      Specified by:
      put in interface org.apache.hadoop.yarn.server.timeline.TimelineWriter
    • put

      public void put(org.apache.hadoop.yarn.api.records.timeline.TimelineDomain arg0) throws IOException
      Specified by:
      put in interface org.apache.hadoop.yarn.server.timeline.TimelineWriter
      Throws:
      IOException