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

Robert Joseph Evans commented on HADOOP-7425:
---------------------------------------------

Steven,

The build system on trunk has changed to use maven instead of ant so the 
location of the files are different.  In addition to this common, mapreduce, 
and HDFS were split up and common no longer has any direct dependencies on 
mapreduce, but the new test does, so it will not compile.  ReflectionUtils 
loads the mapreduce dependencies using reflection now, which is ugly, but 
works.  If you want this fix to go into the 1.0 line, 0.21 or even 0.22 we also 
need to have a version that is compatible with trunk so we do not get any 
regressions in newer versions.

In addition to this, looking at the code I am not sure of all of the 
ramifications of not having JobConfiguration.configure called for all classes 
that are both JobConfigurable and Configurable.  There are other classes that 
may rely on this behavior.  I think I would prefer to see 
KeyFieldBasedPartitioner updated to handle having both methods called.
                
> ReflectionUtils.setConf would configure anything Configurable twice
> -------------------------------------------------------------------
>
>                 Key: HADOOP-7425
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7425
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.20.2, 0.20.205.0, 0.21.0, 0.23.0
>            Reporter: steven zhuang
>              Labels: patch
>         Attachments: HADOOP-7425.patch, hadoop7425.patch, test.tar
>
>
> In  the setConf method of org.apache.hadoop.util.ReflectionUtils, any 
> instance of Configurable would be configured twice.
> In 0.21.0, KeyFieldBasedPartitioner implements the Configurable interface. 
> When configured twice, it get two KeyDescription and gives out wrong 
> partition number. 
> public static void setConf(Object theObject, Configuration conf) {
>     if (conf != null) {
>       if (theObject instanceof Configurable) {
>         ((Configurable) theObject).setConf(conf);
>       }
>       setJobConf(theObject, conf);
>     }
>   }

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

        

Reply via email to