[
https://issues.apache.org/jira/browse/MRUNIT-14?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216567#comment-13216567
]
Jim Donofrio commented on MRUNIT-14:
------------------------------------
I understand why you made this change for a JUnit test class with a single
@Test method. However, calling configure and close prevents one from calling
configure once in a @BeforeClass method and testing several (key, value) pairs
in a series of separate @Test methods using the same static Mapper or Reduce
instance. This more closely mirrors what the actual mapreduce does and allows
one to make sure they are properly clearing state between different (key,
value) pairs.
This change also makes 0.8.x non backwards compatible with mapreduce jobs that
test with mrunit 0.5.0 since you will call configure again with an empty
Configuration object after we already called it.
Maybe you could make calling configure and close configurable by us providing a
boolean in a constructor to indicate whether you should call configure and close
> Support JobConfigurable and Closable interfaces
> -----------------------------------------------
>
> Key: MRUNIT-14
> URL: https://issues.apache.org/jira/browse/MRUNIT-14
> Project: MRUnit
> Issue Type: Improvement
> Affects Versions: 0.5.0
> Reporter: E. Sammer
> Assignee: Brock Noland
> Fix For: 0.8.0
>
>
> MRUnit should support the invocation of a mapper or reducer's configure() and
> close() methods as dictated by JobConfigurable and Closable respectively.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira