Hadoop uses the Writable interface-based classes as the data types for the MapReduce computations. These data types are used throughout the MapReduce computational flow, starting with reading the input data, transferring intermediate data between Map and Reduce tasks, and finally, when writing the output data. Choosing the appropriate Writable
data types for your input, intermediate, and output data can have a large effect on the performance and the programmability of your MapReduce programs.
In order to be used as a value
data type of a MapReduce computation, a data type must implement the org.apache.hadoop.io.Writable
interface. The Writable
interface defines how Hadoop should serialize and de-serialize the values when transmitting and storing the data. In order to be used as a key
data type of a MapReduce computation, a data type must implement the org.apache.hadoop.io.WritableComparable<T>
interface. In addition to the functionality of the...