Class TimelineEntity
java.lang.Object
org.apache.hadoop.yarn.api.records.timeline.TimelineEntity
- All Implemented Interfaces:
Comparable<TimelineEntity>
The class that contains the the meta information of some conceptual entity and its related events. The entity can be an application, an application attempt, a container or whatever the user-defined object.
Primary filters will be used to index the entities in
TimelineStore, such that users should carefully choose the
information they want to store as the primary filters. The remaining can be
stored as other information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvent(TimelineEvent event) Add a single event related to the entity to the existing event listvoidaddEvents(List<TimelineEvent> events) Add a list of events related to the entity to the existing event listvoidaddOtherInfo(String key, Object value) Add one piece of other information of the entity to the existing other info mapvoidaddOtherInfo(Map<String, Object> otherInfo) Add a map of other information of the entity to the existing other info mapvoidaddPrimaryFilter(String key, Object value) Add a single piece of primary filter to the existing primary filter mapvoidaddPrimaryFilters(Map<String, Set<Object>> primaryFilters) Add a map of primary filters to the existing primary filter mapvoidaddRelatedEntities(Map<String, Set<String>> relatedEntities) Add a map of related entities to the existing related entity mapvoidaddRelatedEntity(String entityType, String entityId) Add an entity to the existing related entity mapintcompareTo(TimelineEntity other) booleanGet the ID of the domain that the entity is to be putGet the entity IdGet the entity typeGet a list of events related to the entityGet the other information of the entitygetOtherInfoJAXB()Get the primary filtersgetPrimaryFiltersJAXB()Get the related entitiesgetRelatedEntitiesJAXB()Get the start time of the entityinthashCode()voidsetDomainId(String domainId) Set the ID of the domain that the entity is to be putvoidsetEntityId(String entityId) Set the entity IdvoidsetEntityType(String entityType) Set the entity typevoidsetEvents(List<TimelineEvent> events) Set the event list to the given list of events related to the entityvoidsetOtherInfo(Map<String, Object> otherInfo) Set the other info map to the given map of other informationvoidsetPrimaryFilters(Map<String, Set<Object>> primaryFilters) Set the primary filter map to the given map of primary filtersvoidsetRelatedEntities(Map<String, Set<String>> relatedEntities) Set the related entity map to the given map of related entitiesvoidsetStartTime(Long startTime) Set the start time of the entity
-
Constructor Details
-
TimelineEntity
public TimelineEntity()
-
-
Method Details
-
getEntityType
Get the entity type- Returns:
- the entity type
-
setEntityType
Set the entity type- Parameters:
entityType- the entity type
-
getEntityId
Get the entity Id- Returns:
- the entity Id
-
setEntityId
Set the entity Id- Parameters:
entityId- the entity Id
-
getStartTime
Get the start time of the entity- Returns:
- the start time of the entity
-
setStartTime
Set the start time of the entity- Parameters:
startTime- the start time of the entity
-
getEvents
Get a list of events related to the entity- Returns:
- a list of events related to the entity
-
addEvent
Add a single event related to the entity to the existing event list- Parameters:
event- a single event related to the entity
-
addEvents
Add a list of events related to the entity to the existing event list- Parameters:
events- a list of events related to the entity
-
setEvents
Set the event list to the given list of events related to the entity- Parameters:
events- events a list of events related to the entity
-
getRelatedEntities
Get the related entities- Returns:
- the related entities
-
getRelatedEntitiesJAXB
-
addRelatedEntity
Add an entity to the existing related entity map- Parameters:
entityType- the entity typeentityId- the entity Id
-
addRelatedEntities
Add a map of related entities to the existing related entity map- Parameters:
relatedEntities- a map of related entities
-
setRelatedEntities
Set the related entity map to the given map of related entities- Parameters:
relatedEntities- a map of related entities
-
getPrimaryFilters
Get the primary filters- Returns:
- the primary filters
-
getPrimaryFiltersJAXB
-
addPrimaryFilter
Add a single piece of primary filter to the existing primary filter map- Parameters:
key- the primary filter keyvalue- the primary filter value
-
addPrimaryFilters
Add a map of primary filters to the existing primary filter map- Parameters:
primaryFilters- a map of primary filters
-
setPrimaryFilters
Set the primary filter map to the given map of primary filters- Parameters:
primaryFilters- a map of primary filters
-
getOtherInfo
Get the other information of the entity- Returns:
- the other information of the entity
-
getOtherInfoJAXB
-
addOtherInfo
Add one piece of other information of the entity to the existing other info map- Parameters:
key- the other information keyvalue- the other information value
-
addOtherInfo
Add a map of other information of the entity to the existing other info map- Parameters:
otherInfo- a map of other information
-
setOtherInfo
Set the other info map to the given map of other information- Parameters:
otherInfo- a map of other information
-
getDomainId
Get the ID of the domain that the entity is to be put- Returns:
- the domain ID
-
setDomainId
Set the ID of the domain that the entity is to be put- Parameters:
domainId- the name space ID
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<TimelineEntity>
-