You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Andras Bokor (JIRA)" <ji...@apache.org> on 2018/01/26 14:40:00 UTC

[jira] [Resolved] (HADOOP-9697) Mapper example

     [ https://issues.apache.org/jira/browse/HADOOP-9697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andras Bokor resolved HADOOP-9697.
----------------------------------
    Resolution: Not A Problem

It this example the key is not used. It's a common think that the key is Object when it is not used.

I think we should force the users to use WritableComparable with generics but that is out of this ticket's scope.

> Mapper example
> --------------
>
>                 Key: HADOOP-9697
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9697
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: DeepakVohra
>            Priority: Minor
>
> The org.apache.hadoop.mapreduce 
> Class 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 
> Interface WritableComparable<T>
> The example has Object for key type. Object doesn't implement WritableComparable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org