mrunit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Donofrio (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MRUNIT-114) should support calling configure on sorting and grouping comparators if applicable
Date Wed, 30 May 2012 02:32:22 GMT

     [ https://issues.apache.org/jira/browse/MRUNIT-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jim Donofrio updated MRUNIT-114:
--------------------------------

    Description: 
>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.

  was:
>From Jacob Metcalf:

{noformat}
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.
{noformat}


We fail to use ReflectionUtils.newInstance on the 2 comparators, it would be better if most
of these classes only took classes as input instead of the actual object

{noformat}
  public void setKeyGroupingComparator(
      final RawComparator<K2> groupingComparator) {
    keyGroupComparator = ReflectionUtils.newInstance(returnNonNull(groupingComparator).getClass(),
getConfiguration());
  }

  public void setKeyOrderComparator(final RawComparator<K2> orderComparator) {
    keyValueOrderComparator = ReflectionUtils.newInstance(returnNonNull(orderComparator),
getConfiguration());
  }
{noformat}
                
> 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: Jim Donofrio
>            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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message