The class org.apache.hadoop.mapreduce.Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
has an example with
public void map(Object key, Text value, Context context)
But, "Any type which is to be used as a key in the Hadoop Map-Reduce framework should implement this interface."org.apache.hadoop.io.WritableComparable<T>
The example has Object for key type. Object doesn't implement WritableComparable.
The example should be modified to make the key type as a class that implements the WritableComparable interface.