Class TimelineDataManager
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.timeline.TimelineDataManager
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
public class TimelineDataManager
extends org.apache.hadoop.service.AbstractService
The class wrap over the timeline store and the ACLs manager. It does some non
trivial manipulation of the timeline data before putting or after getting it
from the timeline store, and checks the user's access to it.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTimelineDataManager(TimelineStore store, TimelineACLsManager timelineACLsManager) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.api.records.timeline.TimelineDomainGet a single domain of the particular ID.org.apache.hadoop.yarn.api.records.timeline.TimelineDomainsgetDomains(String owner, org.apache.hadoop.security.UserGroupInformation callerUGI) Get all the domains that belong to the given owner.org.apache.hadoop.yarn.api.records.timeline.TimelineEntitiesgetEntities(String entityType, NameValuePair primaryFilter, Collection<NameValuePair> secondaryFilter, Long windowStart, Long windowEnd, String fromId, Long fromTs, Long limit, EnumSet<TimelineReader.Field> fields, org.apache.hadoop.security.UserGroupInformation callerUGI) Get the timeline entities that the given user have access to.org.apache.hadoop.yarn.api.records.timeline.TimelineEntitygetEntity(String entityType, String entityId, EnumSet<TimelineReader.Field> fields, org.apache.hadoop.security.UserGroupInformation callerUGI) Get the single timeline entity that the given user has access to.org.apache.hadoop.yarn.api.records.timeline.TimelineEventsgetEvents(String entityType, SortedSet<String> entityIds, SortedSet<String> eventTypes, Long windowStart, Long windowEnd, Long limit, org.apache.hadoop.security.UserGroupInformation callerUGI) Get the events whose entities the given user has access to.org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponsepostEntities(org.apache.hadoop.yarn.api.records.timeline.TimelineEntities entities, org.apache.hadoop.security.UserGroupInformation callerUGI) Store the timeline entities into the store and set the owner of them to the given user.voidputDomain(org.apache.hadoop.yarn.api.records.timeline.TimelineDomain domain, org.apache.hadoop.security.UserGroupInformation callerUGI) Add or update an domain.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) 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, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
DEFAULT_DOMAIN_ID
- See Also:
-
-
Constructor Details
-
TimelineDataManager
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
getEntities
public org.apache.hadoop.yarn.api.records.timeline.TimelineEntities getEntities(String entityType, NameValuePair primaryFilter, Collection<NameValuePair> secondaryFilter, Long windowStart, Long windowEnd, String fromId, Long fromTs, Long limit, EnumSet<TimelineReader.Field> fields, org.apache.hadoop.security.UserGroupInformation callerUGI) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException Get the timeline entities that the given user have access to. The meaning of each argument has been documented withTimelineReader.getEntities(java.lang.String, java.lang.Long, java.lang.Long, java.lang.Long, java.lang.String, java.lang.Long, org.apache.hadoop.yarn.server.timeline.NameValuePair, java.util.Collection<org.apache.hadoop.yarn.server.timeline.NameValuePair>, java.util.EnumSet<org.apache.hadoop.yarn.server.timeline.TimelineReader.Field>, org.apache.hadoop.yarn.server.timeline.TimelineDataManager.CheckAcl).- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException- See Also:
-
getEntity
public org.apache.hadoop.yarn.api.records.timeline.TimelineEntity getEntity(String entityType, String entityId, EnumSet<TimelineReader.Field> fields, org.apache.hadoop.security.UserGroupInformation callerUGI) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException Get the single timeline entity that the given user has access to. The meaning of each argument has been documented withTimelineReader.getEntity(java.lang.String, java.lang.String, java.util.EnumSet<org.apache.hadoop.yarn.server.timeline.TimelineReader.Field>).- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException- See Also:
-
getEvents
public org.apache.hadoop.yarn.api.records.timeline.TimelineEvents getEvents(String entityType, SortedSet<String> entityIds, SortedSet<String> eventTypes, Long windowStart, Long windowEnd, Long limit, org.apache.hadoop.security.UserGroupInformation callerUGI) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException Get the events whose entities the given user has access to. The meaning of each argument has been documented withTimelineReader.getEntityTimelines(java.lang.String, java.util.SortedSet<java.lang.String>, java.lang.Long, java.lang.Long, java.lang.Long, java.util.Set<java.lang.String>).- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException- See Also:
-
postEntities
public org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponse postEntities(org.apache.hadoop.yarn.api.records.timeline.TimelineEntities entities, org.apache.hadoop.security.UserGroupInformation callerUGI) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException Store the timeline entities into the store and set the owner of them to the given user.- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
putDomain
public void putDomain(org.apache.hadoop.yarn.api.records.timeline.TimelineDomain domain, org.apache.hadoop.security.UserGroupInformation callerUGI) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException Add or update an domain. If the domain already exists, only the owner and the admin can update it.- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
getDomain
public org.apache.hadoop.yarn.api.records.timeline.TimelineDomain getDomain(String domainId, org.apache.hadoop.security.UserGroupInformation callerUGI) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException Get a single domain of the particular ID. If callerUGI is not the owner or the admin of the domain, null will be returned.- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
getDomains
public org.apache.hadoop.yarn.api.records.timeline.TimelineDomains getDomains(String owner, org.apache.hadoop.security.UserGroupInformation callerUGI) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException Get all the domains that belong to the given owner. If callerUGI is not the owner or the admin of the domain, empty list is going to be returned.- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-