You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrunit.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2012/12/06 19:57:09 UTC
[jira] [Created] (MRUNIT-166) mapreduce reducers are passed mapred
taskattemptid/taskid class instances
Patrick Hunt created MRUNIT-166:
-----------------------------------
Summary: mapreduce reducers are passed mapred taskattemptid/taskid class instances
Key: MRUNIT-166
URL: https://issues.apache.org/jira/browse/MRUNIT-166
Project: MRUnit
Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Patrick Hunt
I have a mapreduce API based reducer. When my test runs the setup method is called with a mapred taskattemptid/taskid. You can see it in the following. I'm printing the classes of the passed context, taskattemptid, taskid. You can see that my reducer is getting called through mapreduce.Reduce.run().
{noformat}
PDH setup context:class org.apache.hadoop.mapreduce.Reducer$Context$$EnhancerByMockitoWithCGLIB$$fc977043
PDH setup taskattemptid:class org.apache.hadoop.mapred.TaskAttemptID
PDH setup taskid:class org.apache.hadoop.mapred.TaskID
PDH setup stack:
at foo.FooReducerTest$MyFooReducer.setup(FooReducerTest.java:75)
at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:162)
at org.apache.hadoop.mrunit.mapreduce.ReduceDriver.run(ReduceDriver.java:139)
at foo.FooReducerTest.testReducer(FooReducerTest.java:120)
{noformat}
this causes my tests to fail due to later invocations of the test are also exercising a subclass of FileOutputFormat, specifically the method
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.getRecordWriter(TaskAttemptContext)
getRecordWriter is called with a context that provides mapreduce based taskattemptid/taskid.
The code is comparing the taskid of setup to getRecordWriter, which fails due to the classes being different (even though the data, taskid, itself is the same)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira