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

Dave Beech commented on MRUNIT-114:
-----------------------------------

That's correct, because the mapred api KeyFieldBasedComparator is 
JobConfigurable instead of Configurable. It will only be configured with a 
JobConf, not a plain Configuration. 

When I first noticed this I was hesitant to use JobConf anywhere for the new 
mapreduce API version of our test runners, but from looking through Hadoop 
source I see that JobConf is actually used pretty much everywhere internally. 
It's just no longer used by the client when setting up a job.  
                
> should support calling configure on sorting and grouping comparators if 
> applicable
> ----------------------------------------------------------------------------------
>
>                 Key: MRUNIT-114
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-114
>             Project: MRUnit
>          Issue Type: Bug
>            Reporter: Jacob Metcalf
>            Assignee: Jim Donofrio
>             Fix For: 1.0.0
>
>
> From Jacob Metcalf:
> On another subject (maybe I need a new thread/JIRA for this) is it 
> intentional that the configuration is not applied to the sorting and grouping 
> comparators?
> I am writing my own multiple input MR driver to test a reduce side join and 
> had to do:
>             // Configure grouping and sorting comparators
>    if (keyGroupComparator instanceof Configured ) {
>        ((Configured)keyGroupComparator).setConf( configuration );
>    }
>    if (keyValueOrderComparator instanceof Configured) {
>        ((Configured)keyValueOrderComparator).setConf( configuration );
>    }
> To get the config applied even though they are Configured objects.

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

Reply via email to