[
https://issues.apache.org/jira/browse/HADOOP-6105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731908#action_12731908
]
V.V.Chaitanya Krishna commented on HADOOP-6105:
-----------------------------------------------
Assumptions:
1. None of the *-default.xml files would have deprecated keys.
========
Changes to set and get method in configuration.
get(name): the key(name) is checked in the deprecation map. If present,
the method returns the value of the first key in the list of new keys.
set(name,value): the key (name) is checked in the deprecation map. If
present, the method sets all the new replacing keys with "value".
========
Following table describes the set and get behaviour:
||Old Key ||New Key ||get(oldkey) ||get(newKey)||
|set|set|old/newValue(whichever is recently set)|old/new value(whichever
is recently set)|
|unSet|unSet|default value of newKey|default value of new key|
|set|unSet|oldValue|old value|
|unSet|set|newValue|newValue|
Note: the set and unset in the above table refers to the keys being
set dynamically i.e calling Configuration setter methods.
> 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.