mrunit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Conwell (JIRA)" <>
Subject [jira] [Commented] (MRUNIT-213) MultipleOutputs for Reducers throws Named output 'test' not defined
Date Fri, 13 Jun 2014 22:10:02 GMT


John Conwell commented on MRUNIT-213:

A bit more context to this bug.  In order to use MRUnit with multiple outputs, it looks like
your are required to run the test with PowerMockRunner and pass your reducer into PrepareForTest.
 Without setting these two attributes on your test call, MultipleOutputs wont get mocked and
you end up with the exception.  This isn't documented anywhere, and its the first place (that
I've found) that required the use of something other than straight forward JUnit attributes
on the unit tests.

> MultipleOutputs for Reducers throws Named output 'test' not defined
> -------------------------------------------------------------------
>                 Key: MRUNIT-213
>                 URL:
>             Project: MRUnit
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: OSX, IntelliJ, CDH4.6.0
>            Reporter: John Conwell
> I pulled the unit test for testing multiple outputs for a reducer from the patch of MRUNIT-13
and the test fails with the exception:
> java.lang.IllegalArgumentException: Named output 'test' not defined
> 	at org.apache.hadoop.mapreduce.lib.output.MultipleOutputs.checkNamedOutputName(
> 	at org.apache.hadoop.mapreduce.lib.output.MultipleOutputs.write(
> 	at org.apache.hadoop.mapreduce.lib.output.MultipleOutputs.write(
> It looks like multiple reducer outputs needs to be setup in the Configuration object
the same way MultipleOutputs.addNamedOutput() does.
> I'm running cdh4.6.0

This message was sent by Atlassian JIRA

View raw message