org.apache.hadoop.yarn.api.records.timelineservice

## Class TimelineEvent

- java.lang.Object
- - org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent

- All Implemented Interfaces:
    Comparable<TimelineEvent>

      @InterfaceAudience.Public
       @InterfaceStability.Unstable
      public class TimelineEvent
      extends Object
      implements Comparable<TimelineEvent>

  This class contains the information of an event that belongs to an entity. Users are free to define what the event means, such as starting an application, container being allocated, etc.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `INVALID_TIMESTAMP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimelineEvent()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addInfo(Map<String,Object> infos)`
    `void` | `addInfo(String key, Object value)`
    `int` | `compareTo(TimelineEvent other)`
    `boolean` | `equals(Object o)`
    `String` | `getId()`
    `Map<String,Object>` | `getInfo()`
    `long` | `getTimestamp()`
    `int` | `hashCode()`
    `boolean` | `isValid()`
    `void` | `setId(String eventId)`
    `void` | `setInfo(Map<String,Object> infos)`
    `void` | `setTimestamp(long ts)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INVALID_TIMESTAMP

          public static final long INVALID_TIMESTAMP

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TimelineEvent

          public TimelineEvent()

  - ### Method Detail

    - #### getId

          public String getId()

    - #### setId

          public void setId(String eventId)

    - #### getInfo

          public Map<String,Object> getInfo()

    - #### setInfo

          public void setInfo(Map<String,Object> infos)

    - #### addInfo

          public void addInfo(Map<String,Object> infos)

    - #### addInfo

          public void addInfo(String key,
                              Object value)

    - #### getTimestamp

          public long getTimestamp()

    - #### setTimestamp

          public void setTimestamp(long ts)

    - #### isValid

          public boolean isValid()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### compareTo

          public int compareTo(TimelineEvent other)

      Specified by:
        `compareTo` in interface `Comparable<TimelineEvent>`

Copyright © 2022 Apache Software Foundation. All rights reserved.