Class EventColumnNameConverter

java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.common.EventColumnNameConverter
All Implemented Interfaces:
KeyConverter<EventColumnName>

public final class EventColumnNameConverter extends Object implements KeyConverter<EventColumnName>
Encodes and decodes event column names for application and entity tables. The event column name is of the form : eventId=timestamp=infokey. If info is not associated with the event, event column name is of the form : eventId=timestamp= Event timestamp is long and rest are strings. Column prefixes are not part of the eventcolumn name passed for encoding. It is added later, if required in the associated ColumnPrefix implementations.
  • Constructor Details

    • EventColumnNameConverter

      public EventColumnNameConverter()
  • Method Details

    • encode

      public byte[] encode(EventColumnName key)
      Description copied from interface: KeyConverter
      Encodes a key as a byte array.
      Specified by:
      encode in interface KeyConverter<EventColumnName>
      Parameters:
      key - key to be encoded.
      Returns:
      a byte array.
    • decode

      public EventColumnName decode(byte[] bytes)
      Description copied from interface: KeyConverter
      Decodes a byte array and returns a key of type T.
      Specified by:
      decode in interface KeyConverter<EventColumnName>
      Parameters:
      bytes - byte representation
      Returns:
      an object(key) of type T which has been constructed after decoding the bytes.