- All Implemented Interfaces:
- NewWritable<java.lang.Object>, java.io.Serializable, java.lang.Comparable<KeyWritable>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<KeyWritable>
public class KeyWritable
extends TypeAwareWritable<java.lang.Object>
implements org.apache.hadoop.io.WritableComparable<KeyWritable>, java.io.Serializable
This class represents a universal Writable with the goal of recognizing
and properly writing/reading multiple types of data.
More documentation to follow as its design progresses, but at the moment the mechanism is simple:
1. Prepend each value with a byte representing its type
2. Write value data as byte[]
For fixed formats such as Int, Long etc., its standard byte representation is used (e.g., Int = 4 bytes)
For Objects (variable length) object serialization is used with custom se/deser to be exposed for
customization and optimization
This class is not public nor it is meant/designed as thread-safe.
- See Also:
- Serialized Form