You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "steven zhuang (JIRA)" <ji...@apache.org> on 2011/06/27 04:07:47 UTC

[jira] [Updated] (HADOOP-7425) ReflectionUtils.setConf would configure anything Configurable twice

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

steven zhuang updated HADOOP-7425:
----------------------------------

    Description: 
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);
    }
  }


  was:
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);
    }
  }


        Summary: ReflectionUtils.setConf would configure anything Configurable twice  (was: ReflectionUtils.setConf would configure the KeyFieldBasedPartitioner twice in Hadoop 0.21.0, when KeyFieldBasedPartitioner is an Configurable instance)

> 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.21.0
>            Reporter: steven zhuang
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira