hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom White (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-1231) Add generics to Mapper and Reducer interfaces
Date Sun, 05 Aug 2007 20:11:29 GMT

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

Tom White updated HADOOP-1231:
------------------------------

    Attachment: HADOOP-1231.patch

This patch (HADOOP-1231.patch) makes the Map Reduce public API generic. As mentioned above,
this does not mean that user programs are type checked at compile time, but it does mean they
are explicit about the types they use and casts are unnecessary.

There is a non-backwards compatible change to RecordReader#record. The old signature was:

{code}
boolean next(Writable key, Writable value) throws IOException;
{code}

the new signature is (the generic equivalent of)

{code}
boolean next(WritableComparable key, Writable value) throws IOException;
{code}

Apart from this change the patch is backwards compatible (binary and source). For example,
this means an older version of the word count example can be run against the new patch.

> Add generics to Mapper and Reducer interfaces
> ---------------------------------------------
>
>                 Key: HADOOP-1231
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1231
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Owen O'Malley
>            Assignee: Tom White
>         Attachments: HADOOP-1231.patch, HADOOP-1231.patch, MapReduceTypes.html
>
>
> By making the input and output types of the Mapper and Reducers generic, we can get the
information from the classes and not require the user to set them in the configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message