hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9854) Configuration.set() may be called before all the deprecated keys are registered, causing inconsistent state
Date Wed, 18 Sep 2013 20:17:59 GMT

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

Jason Lowe commented on HADOOP-9854:

I'm wondering if the fix is simply to use the appropriate configuration object for the tool
in question.  Since the tool requires supporting MapReduce configs, have it use JobConf which
is MapReduce-aware instead of Configuration which is not.  For example:

public static void main(String[] args) {
  ToolRunner.run(new JobConf(), new MyClass(), args);

Otherwise I don't see how we can determine that the particular Configuration object is really
going to later be a JobConf object and load the deprecated keys ahead of time. Even if we
tried to fix it up after the fact we could encounter situations where the config has conflicting
values for keys.  For example, two different chunks of code use different keys for the same
concept and we end up with something like -Dmapred.reduce.tasks=20 and -Dmapreduce.job.reduces=100.
 If these keys were set before the Configuration morphed into a JobConf, we wouldn't know
which was the correct setting that should survive once JobConf arrives and tries to rectify
the situation.
> Configuration.set() may be called before all the deprecated keys are registered, causing
inconsistent state
> -----------------------------------------------------------------------------------------------------------
>                 Key: HADOOP-9854
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9854
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.0.5-alpha
>            Reporter: Sangjin Lee
>            Priority: Blocker
> Currently deprecated keys are registered at various times. Some are registered  when
the Configuration class itself is initialized, but the vast majority are registered when the
JobConf class is initialized.
> Therefore, it is entirely possible (and does happen) that Configuration.set() is called
for a key before its deprecation mapping is registered, thus leaving the internal state of
Configuration in an inconsistent state.
> We actually had this problem occur in real life, causing the set value not to be recognized.

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

View raw message