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 "Milind Bhandarkar (JIRA)" <ji...@apache.org> on 2006/08/01 00:11:13 UTC
[jira] Created: (HADOOP-403) close method in a Mapper should be
provided with OutputCollector and a Reporter
close method in a Mapper should be provided with OutputCollector and a Reporter
-------------------------------------------------------------------------------
Key: HADOOP-403
URL: http://issues.apache.org/jira/browse/HADOOP-403
Project: Hadoop
Issue Type: Improvement
Components: mapred
Affects Versions: 0.5.0
Environment: all
Reporter: Milind Bhandarkar
Assigned To: Milind Bhandarkar
Fix For: 0.5.0
For mappers with side-effects, or mappers that work as aggregators (i.e. no output on individual key-value pairs, but an aggregate output at the end of all key-value pairs), output should be performed in the close method. For this purpose, we need to supply output collector and reporter to the close method of Mapper. This involves interface change, though. Thoughts ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-403) close method in a Mapper should be
provided with OutputCollector and a Reporter
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-403?page=comments#action_12425381 ]
Owen O'Malley commented on HADOOP-403:
--------------------------------------
I'm very uncomfortable with passing the Reporter and OutputCollector via the JobConf.
It does two bad things:
1. It passes "real" Java objects around in the JobConf, which breaks the assumption that the JobConf can be serialized successfully. (In this case, it is ok because it won't cross the process boundary, but it breaks the developers expectations.)
2. It hides the information that application writers need in a very hidden place. If I look at Mapper or Reducer, I won't see the information that I have available. Only if I scan through the HUGE JobConf API will I see the fact that they are avaiable.
I strongly suggest that we just take the hit and extend the Closeable interface. I'd propose:
1. Making the Closeable.close() method depricated.
2. Add a new Closeable.close(OutputCollector, Reporter) method.
3. In MapReduceBase provide a default implementation that calls the close() method.
That should minimize the breakage in user code and still make the intended interface clear.
> close method in a Mapper should be provided with OutputCollector and a Reporter
> -------------------------------------------------------------------------------
>
> Key: HADOOP-403
> URL: http://issues.apache.org/jira/browse/HADOOP-403
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.5.0
> Environment: all
> Reporter: Milind Bhandarkar
> Assigned To: Milind Bhandarkar
> Fix For: 0.5.0
>
>
> For mappers with side-effects, or mappers that work as aggregators (i.e. no output on individual key-value pairs, but an aggregate output at the end of all key-value pairs), output should be performed in the close method. For this purpose, we need to supply output collector and reporter to the close method of Mapper. This involves interface change, though. Thoughts ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-403) close method in a Mapper should be
provided with OutputCollector and a Reporter
Posted by "Milind Bhandarkar (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-403?page=comments#action_12425021 ]
Milind Bhandarkar commented on HADOOP-403:
------------------------------------------
I just checked that this can be done without changing the mapper interface. We can hang the Reporter and OutputCollector off of JobConf which is passed to configure method. I will attach a patch soon.
> close method in a Mapper should be provided with OutputCollector and a Reporter
> -------------------------------------------------------------------------------
>
> Key: HADOOP-403
> URL: http://issues.apache.org/jira/browse/HADOOP-403
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.5.0
> Environment: all
> Reporter: Milind Bhandarkar
> Assigned To: Milind Bhandarkar
> Fix For: 0.5.0
>
>
> For mappers with side-effects, or mappers that work as aggregators (i.e. no output on individual key-value pairs, but an aggregate output at the end of all key-value pairs), output should be performed in the close method. For this purpose, we need to supply output collector and reporter to the close method of Mapper. This involves interface change, though. Thoughts ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-403) close method in a Mapper should be
provided with OutputCollector and a Reporter
Posted by "Runping Qi (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-403?page=comments#action_12427732 ]
Runping Qi commented on HADOOP-403:
-----------------------------------
In my app, I added an OutputCollector variable (and a Reporter variable if necessary) in my Map/Reduce classes so that the close method can access them. Those variables are assigned only once my the first call to Map/Reduce method.
If the framework should offer help here, we can introduce to Closable a method setCollector(OutputCollector) and setReporter(Reporter). When the framework creates a Mapper/Reducer object, it calls these methods.
> close method in a Mapper should be provided with OutputCollector and a Reporter
> -------------------------------------------------------------------------------
>
> Key: HADOOP-403
> URL: http://issues.apache.org/jira/browse/HADOOP-403
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.5.0
> Environment: all
> Reporter: Milind Bhandarkar
> Assigned To: Milind Bhandarkar
> Fix For: 0.6.0
>
>
> For mappers with side-effects, or mappers that work as aggregators (i.e. no output on individual key-value pairs, but an aggregate output at the end of all key-value pairs), output should be performed in the close method. For this purpose, we need to supply output collector and reporter to the close method of Mapper. This involves interface change, though. Thoughts ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HADOOP-403) close method in a Mapper should be
provided with OutputCollector and a Reporter
Posted by "Milind Bhandarkar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milind Bhandarkar resolved HADOOP-403.
--------------------------------------
Resolution: Won't Fix
Assignee: (was: Milind Bhandarkar)
The upcoming task context eliminates the need for this.
> close method in a Mapper should be provided with OutputCollector and a Reporter
> -------------------------------------------------------------------------------
>
> Key: HADOOP-403
> URL: https://issues.apache.org/jira/browse/HADOOP-403
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.5.0
> Environment: all
> Reporter: Milind Bhandarkar
>
> For mappers with side-effects, or mappers that work as aggregators (i.e. no output on individual key-value pairs, but an aggregate output at the end of all key-value pairs), output should be performed in the close method. For this purpose, we need to supply output collector and reporter to the close method of Mapper. This involves interface change, though. Thoughts ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-403) close method in a Mapper should be
provided with OutputCollector and a Reporter
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-403?page=comments#action_12427956 ]
Doug Cutting commented on HADOOP-403:
-------------------------------------
I don't think we should make all future io.Closeable implementations deal with a mapred.OutputCollector. I would prefer any such methods were added to a new interface, perhaps mapred.Output.
One can easily workaround this problem by specifying an alternate MapRunnable. Is this issue really so common that this workaround, or Runping's, do not suffice?
> close method in a Mapper should be provided with OutputCollector and a Reporter
> -------------------------------------------------------------------------------
>
> Key: HADOOP-403
> URL: http://issues.apache.org/jira/browse/HADOOP-403
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.5.0
> Environment: all
> Reporter: Milind Bhandarkar
> Assigned To: Milind Bhandarkar
> Fix For: 0.6.0
>
>
> For mappers with side-effects, or mappers that work as aggregators (i.e. no output on individual key-value pairs, but an aggregate output at the end of all key-value pairs), output should be performed in the close method. For this purpose, we need to supply output collector and reporter to the close method of Mapper. This involves interface change, though. Thoughts ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-403) close method in a Mapper should be
provided with OutputCollector and a Reporter
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-403?page=comments#action_12424687 ]
Bryan Pendleton commented on HADOOP-403:
----------------------------------------
+1 on this one. Reporter or Progressable objects should be passed into *any* call in this project, but I've also run into the need to output "after all maps", with no hook currently available to do it.
> close method in a Mapper should be provided with OutputCollector and a Reporter
> -------------------------------------------------------------------------------
>
> Key: HADOOP-403
> URL: http://issues.apache.org/jira/browse/HADOOP-403
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.5.0
> Environment: all
> Reporter: Milind Bhandarkar
> Assigned To: Milind Bhandarkar
> Fix For: 0.5.0
>
>
> For mappers with side-effects, or mappers that work as aggregators (i.e. no output on individual key-value pairs, but an aggregate output at the end of all key-value pairs), output should be performed in the close method. For this purpose, we need to supply output collector and reporter to the close method of Mapper. This involves interface change, though. Thoughts ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira