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.STATENested classes/interfaces inherited from interface org.apache.hadoop.yarn.server.timeline.TimelineReader
org.apache.hadoop.yarn.server.timeline.TimelineReader.FieldNested classes/interfaces inherited from interface org.apache.hadoop.yarn.server.timeline.TimelineStore
org.apache.hadoop.yarn.server.timeline.TimelineStore.SystemFilter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected 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 TypeMethodDescriptionorg.apache.hadoop.yarn.api.records.timeline.TimelineDomainorg.apache.hadoop.yarn.api.records.timeline.TimelineDomainsgetDomains(String arg0) org.apache.hadoop.yarn.api.records.timeline.TimelineEntitiesgetEntities(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.TimelineEntitygetEntity(String arg0, String arg1, EnumSet<org.apache.hadoop.yarn.server.timeline.TimelineReader.Field> arg2) org.apache.hadoop.yarn.api.records.timeline.TimelineEventsgetEntityTimelines(String arg0, SortedSet<String> arg1, Long arg2, Long arg3, Long arg4, Set<String> arg5) booleanvoidput(org.apache.hadoop.yarn.api.records.timeline.TimelineDomain arg0) org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponseput(org.apache.hadoop.yarn.api.records.timeline.TimelineEntities arg0) protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidMethods 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, waitForServiceToStopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
-
-
Constructor Details
-
LevelDBCacheTimelineStore
-
LevelDBCacheTimelineStore
-
LevelDBCacheTimelineStore
public LevelDBCacheTimelineStore()
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
serviceStop
- 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:
getEntitiesin interfaceorg.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:
getEntityin interfaceorg.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:
getEntityTimelinesin interfaceorg.apache.hadoop.yarn.server.timeline.TimelineReader
-
getDomain
public org.apache.hadoop.yarn.api.records.timeline.TimelineDomain getDomain(String arg0) throws IOException - Specified by:
getDomainin interfaceorg.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:
getDomainsin interfaceorg.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:
putin interfaceorg.apache.hadoop.yarn.server.timeline.TimelineWriter
-
put
- Specified by:
putin interfaceorg.apache.hadoop.yarn.server.timeline.TimelineWriter- Throws:
IOException
-