Class TimelineEvent

java.lang.Object
org.apache.hadoop.yarn.api.records.timeline.TimelineEvent
All Implemented Interfaces:
Comparable<TimelineEvent>

@Public @Evolving public class TimelineEvent extends Object implements 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 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

      public String getEventType()
      Get the event type
      Returns:
      the event type
    • setEventType

      public void setEventType(String eventType)
      Set the event type
      Parameters:
      eventType - the event type
    • getEventInfo

      public Map<String,Object> getEventInfo()
      Set the information of the event
      Returns:
      the information of the event
    • getEventInfoJAXB

      @Private public HashMap<String,Object> getEventInfoJAXB()
    • addEventInfo

      public void addEventInfo(String key, Object value)
      Add one piece of the information of the event to the existing information map
      Parameters:
      key - the information key
      value - the information value
    • addEventInfo

      public void addEventInfo(Map<String,Object> eventInfo)
      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

      public void setEventInfo(Map<String,Object> eventInfo)
      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

      public int compareTo(TimelineEvent other)
      Specified by:
      compareTo in interface Comparable<TimelineEvent>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object