Class StringKeyConverter
java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.common.StringKeyConverter
- All Implemented Interfaces:
KeyConverter<String>
Encodes and decodes column names / row keys which are merely strings.
Column prefixes are not part of the column name passed for encoding. It is
added later, if required in the associated ColumnPrefix implementations.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StringKeyConverter
public StringKeyConverter()
-
-
Method Details
-
encode
Description copied from interface:KeyConverterEncodes a key as a byte array.- Specified by:
encodein interfaceKeyConverter<String>- 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<String>- Parameters:
bytes- byte representation- Returns:
- an object(key) of type T which has been constructed after decoding the bytes.
-