Class TimelineEvent
java.lang.Object
org.apache.hadoop.yarn.api.records.timeline.TimelineEvent
- All Implemented Interfaces:
Comparable<TimelineEvent>
The class that contains the information of an event that is related to some
conceptual entity of an application. Users are free to define what the event
means, such as starting an application, getting allocated a container and
etc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventInfo(String key, Object value) Add one piece of the information of the event to the existing information mapvoidaddEventInfo(Map<String, Object> eventInfo) Add a map of the information of the event to the existing information mapintcompareTo(TimelineEvent other) booleanSet the information of the eventGet the event typelongGet the timestamp of the eventinthashCode()voidsetEventInfo(Map<String, Object> eventInfo) Set the information map to the given map of the information of the eventvoidsetEventType(String eventType) Set the event typevoidsetTimestamp(long timestamp) Set the timestamp of the event
-
Constructor Details
-
TimelineEvent
public TimelineEvent()
-
-
Method Details
-
getTimestamp
public long getTimestamp()Get the timestamp of the event- Returns:
- the timestamp of the event
-
setTimestamp
public void setTimestamp(long timestamp) Set the timestamp of the event- Parameters:
timestamp- the timestamp of the event
-
getEventType
Get the event type- Returns:
- the event type
-
setEventType
Set the event type- Parameters:
eventType- the event type
-
getEventInfo
Set the information of the event- Returns:
- the information of the event
-
getEventInfoJAXB
-
addEventInfo
Add one piece of the information of the event to the existing information map- Parameters:
key- the information keyvalue- the information value
-
addEventInfo
Add a map of the information of the event to the existing information map- Parameters:
eventInfo- a map of of the information of the event
-
setEventInfo
Set the information map to the given map of the information of the event- Parameters:
eventInfo- a map of of the information of the event
-
compareTo
- Specified by:
compareToin interfaceComparable<TimelineEvent>
-
equals
-
hashCode
public int hashCode()
-