You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Owen O'Malley (JIRA)" <ji...@apache.org> on 2007/07/05 23:42:04 UTC
[jira] Issue Comment Edited: (HADOOP-1231) Add generics to Mapper
and Reducer interfaces
[ https://issues.apache.org/jira/browse/HADOOP-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510490 ]
Owen O'Malley edited comment on HADOOP-1231 at 7/5/07 2:41 PM:
---------------------------------------------------------------
The signatures for JobConf.setMapperClass and setReducerClass should not have parameters. I'd suggest:
{{{code}}}
public void setMapperClass(Class<? extends Mapper> mapper);
public void setReducerClass(Class<? extends Reducer> reducer);
{{{code}}}
In terms of {{LongSumReducer}} and other generic mappers and reducers, I'd be tempted to allow the user to write either the anonymous class that you suggested or use the current solution of:
{{{code}}}
grepJob.setReducerClass(LongSumReducer.class);
grepJob.setOutputValueClass(Text.class);
{{{code}}}
was:
The signatures for JobConf.setMapperClass and setReducerClass should not have parameters. I'd suggest:
{{public void setMapperClass(Class<? extends Mapper> mapper); }}
In terms of {{LongSumReducer}} and other generic mappers and reducers, I'd be tempted to allow the user to write either the anonymous class that you suggested or use the current solution of:
{{{code}}}
grepJob.setReducerClass(LongSumReducer.class);
grepJob.setOutputValueClass(Text.class);
{{{code}}}
> 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
>
>
> 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.