org.apache.hadoop.yarn.api.records.timeline
Class TimelineEvent

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

@InterfaceAudience.Public
@InterfaceStability.Unstable
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 Summary
TimelineEvent()
           
 
Method Summary
 void addEventInfo(Map<String,Object> eventInfo)
          Add a map of the information of the event to the existing information map
 void addEventInfo(String key, Object value)
          Add one piece of the information of the event to the existing information map
 int compareTo(TimelineEvent other)
           
 boolean equals(Object o)
           
 Map<String,Object> getEventInfo()
          Set the information of the event
 String getEventType()
          Get the event type
 long getTimestamp()
          Get the timestamp of the event
 int hashCode()
           
 void setEventInfo(Map<String,Object> eventInfo)
          Set the information map to the given map of the information of the event
 void setEventType(String eventType)
          Set the event type
 void setTimestamp(long timestamp)
          Set the timestamp of the event
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimelineEvent

public TimelineEvent()
Method Detail

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

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


Copyright © 2014 Apache Software Foundation. All Rights Reserved.