@InterfaceAudience.Public @InterfaceStability.Unstable public class TimelineEntity extends Object implements Comparable<TimelineEntity>
isValid()
method). Callers to the getters
should perform null checks for non-primitive type, non-collection members.
Callers are recommended not to alter the returned collection objects from the
getters.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_ENTITY_PREFIX |
protected static String |
SYSTEM_INFO_KEY_PREFIX |
Modifier | Constructor and Description |
---|---|
|
TimelineEntity() |
protected |
TimelineEntity(String type) |
|
TimelineEntity(TimelineEntity entity)
The constuctor is used to construct a proxy
TimelineEntity or its
subclass object from the real entity object that carries information. |
protected static final String SYSTEM_INFO_KEY_PREFIX
public static final long DEFAULT_ENTITY_PREFIX
public TimelineEntity()
public TimelineEntity(TimelineEntity entity)
The constuctor is used to construct a proxy TimelineEntity
or its
subclass object from the real entity object that carries information.
It is usually used in the case where we want to recover class polymorphism after deserializing the entity from its JSON form.
entity
- the real entity that carries informationprotected TimelineEntity(String type)
public String getType()
public void setType(String type)
public String getId()
public void setId(String id)
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier getIdentifier()
public void setIdentifier(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier entityIdentifier)
public Set<TimelineMetric> getMetrics()
public void setMetrics(Set<TimelineMetric> entityMetrics)
public void addMetrics(Set<TimelineMetric> entityMetrics)
public void addMetric(TimelineMetric metric)
public NavigableSet<TimelineEvent> getEvents()
public void setEvents(NavigableSet<TimelineEvent> entityEvents)
public void addEvents(Set<TimelineEvent> entityEvents)
public void addEvent(TimelineEvent event)
public Long getCreatedTime()
public void setCreatedTime(Long createdTs)
public void setUID(String uidKey, String uId)
uidKey
- key for UID in info.uId
- UID to be set for the key.public boolean isValid()
public int compareTo(TimelineEntity other)
compareTo
in interface Comparable<TimelineEntity>
protected TimelineEntity getReal()
public long getIdPrefix()
public void setIdPrefix(long entityIdPrefix)
Note: Entities will be stored in the order of idPrefix specified. If users decide to set idPrefix for an entity, they MUST provide the same prefix for every update of this entity.
Example:Users can useTimelineEntity entity = new TimelineEntity(); entity.setIdPrefix(value);
TimelineServiceHelper.invertLong(long)
to invert
the prefix if necessary.entityIdPrefix
- prefix for an entity.Copyright © 2024 Apache Software Foundation. All rights reserved.