This is an old revision of the document!
MapReduce Tutorial : Predefined formats and types
The Java API differs from the Perl API in one important aspect: the keys and values are types.
The type of a value must be a subclass of Writable, which provides methods for serializing and deserializing values.
The type of a key must be a subclass of WritableComparable, which provides both Writable
and Comparable
interface.
Here is a list of frequently used types:
Text
– UTF-8 encoded stringBytesWritable
– sequence of arbitrary bytesIntWritable
– 32-bit integerLongWritable
– 64-bit integerFloatWritable
– 64-bit floating numberDoubleWritable
– 64-bit floating number
For more complicated types like variable-length encoded integers, dictionaries, bloom filters, etc., see Writable.