hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.V.Chaitanya Krishna (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6105) Provide a way to automatically handle backward compatibility of deprecated keys
Date Thu, 23 Jul 2009 09:39:15 GMT

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

V.V.Chaitanya Krishna commented on HADOOP-6105:


*  Deprecated keys never occur in default.xml files.
*  There won't be any storage for deprecated keys in the Configuration object. Instead, new
key mappings will be used.
*  The precedence order is as follows:
*# Value which comes with the final attribute as true.
*# Value occurring with the deprecated key.

The following table depicts the various cases arising, keeping in view whether the key in
concern is final and if the key is deprecated:

# *Key* - the current key that is to be loaded in loadResource method. It can be a deprecated
key (*old*), key in default.xml (*key_default*) or key in site.xml (*key_site*).
#  *Prev. Occurrence* - The attribute which changed the value of the *Key* most recently.
# *isFinal* - true if  *Key* is having the _final_ property set to true.
# *isPrevFinal* - true if  *Prev. Occurrence* is having the _final_ property set to true.
# *Value* - Value to be expected after *Key* is loaded. It can be either of the values corresponding
to *old*, *key_default* or *key_site*.
# _warn_ - logs a warning message indicating that a final parameter is being attempted to
Also, a warning message which indicates the usage of a deprecated key is logged whenever *Key*
is a deprecated one.

|old|false|key_default|true|key_default (warn)|
|old|false|key_site|true|key_site (warn)|
|key_site|true|key_default|true|key_default (warn)|
|key_site|false|key_default|true|key_default (warn)|

> Provide a way to automatically handle backward compatibility of deprecated keys
> -------------------------------------------------------------------------------
>                 Key: HADOOP-6105
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6105
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>            Reporter: Hemanth Yamijala
> There are cases when we have had to deprecate configuration keys. Use cases include,
changing the names of variables to better match intent, splitting a single parameter into
two - for maps, reduces etc.
> In such cases, we typically provide a backwards compatible option for the old keys. The
handling of such cases might typically be common enough to actually add support for it in
a generic fashion in the Configuration class. Some initial discussion around this started
in HADOOP-5919, but since the project split happened in between we decided to open this issue
to fix it in common.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message