hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen O'Malley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-1230) Replace parameters with context objects in Mapper, Reducer, Partitioner, InputFormat, and OutputFormat classes
Date Fri, 29 Feb 2008 21:34:56 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573973#action_12573973

Owen O'Malley commented on HADOOP-1230:

    * Mapper & Reducer are no longer JobConfigurable, was that intentional?

Yes, it was intentional. With ReflectionUtils, we configure objects if the run-time type is
Configurable or JobConfigurable. So we don't need to declare it in the interface.

    * Another benefit of contexts is that we can avoid serialization. Should we add raw binary
i/o from the outset, or add that in a subsequent pass?

I was going to add it later, but I guess I should add it now. It would mean that there is:

  BytesWritable getRawKey() throws IOException;
  BytesWritable getRawValue() throws IOException;
  void collectRaw(BytesWritable key, BytesWritable value) throws IOException;

I guess at that point, I could redo the IdentityMapper and IdentityReducer to pass along raw

> Replace parameters with context objects in Mapper, Reducer, Partitioner, InputFormat,
and OutputFormat classes
> --------------------------------------------------------------------------------------------------------------
>                 Key: HADOOP-1230
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1230
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>         Attachments: context-objs.patch
> This is a big change, but it will future-proof our API's. To maintain backwards compatibility,
I'd suggest that we move over to a new package name (org.apache.hadoop.mapreduce) and deprecate
the old interfaces and package. Basically, it will replace:
> package org.apache.hadoop.mapred;
> public interface Mapper extends JobConfigurable, Closeable {
>   void map(WritableComparable key, Writable value, OutputCollector output, Reporter reporter)
throws IOException;
> }
> with:
> package org.apache.hadoop.mapreduce;
> public interface Mapper extends Closable {
>   void map(MapContext context) throws IOException;
> }
> where MapContext has the methods like getKey(), getValue(), collect(Key, Value), progress(),

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

View raw message