You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrunit.apache.org by "Brock Noland (JIRA)" <ji...@apache.org> on 2012/12/21 20:19:13 UTC

[jira] [Commented] (MRUNIT-167) context passed to an OuputFormatter is ignored by the framework

    [ https://issues.apache.org/jira/browse/MRUNIT-167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13538314#comment-13538314 ] 

Brock Noland commented on MRUNIT-167:
-------------------------------------

I spent some time looking at this. I am not sure we'd be able to support this in a code base on 1.X and 2.X at the same time.

The TaskAttemptContext.getCounter* methods do not exist in branch-1

https://github.com/apache/hadoop-common/blob/branch-1/src/mapred/org/apache/hadoop/mapreduce/TaskAttemptContext.java

but do in branch-2.

https://github.com/apache/hadoop-common/blob/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptContext.java
                
> context passed to an OuputFormatter is ignored by the framework
> ---------------------------------------------------------------
>
>                 Key: MRUNIT-167
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-167
>             Project: MRUnit
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Patrick Hunt
>            Priority: Blocker
>             Fix For: 1.0.0
>
>
> The following method creates a context that it passes to the output formatter under test, however it ignores the results:
> bq. org.apache.hadoop.mrunit.internal.mapreduce.MockMapreduceOutputFormat.collect(K, V)
> specifically if the output formatter increments counters the counters are not available to the test code. (DummyReporter just creates a new Counter() each time) In my case I'm incrementing counters in my output formatter but these counters are not available when I check in my junit test method at the end of the test run.
> I'm using the latest 1.0.0 snapshot with hadoop2 classifier.

--
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