Class EventColumnNameConverter
java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.common.EventColumnNameConverter
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] bytes) Decodes a byte array and returns a key of type T.byte[]encode(EventColumnName key) Encodes a key as a byte array.
-
Constructor Details
-
EventColumnNameConverter
public EventColumnNameConverter()
-
-
Method Details
-
encode
Description copied from interface:KeyConverterEncodes a key as a byte array.- Specified by:
encodein interfaceKeyConverter<EventColumnName>- Parameters:
key- key to be encoded.- Returns:
- a byte array.
-
decode
Description copied from interface:KeyConverterDecodes a byte array and returns a key of type T.- Specified by:
decodein interfaceKeyConverter<EventColumnName>- Parameters:
bytes- byte representation- Returns:
- an object(key) of type T which has been constructed after decoding the bytes.
-