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

shanyu zhao commented on HADOOP-10178:
--------------------------------------

There is still a problem with the current implementation. The iterator() 
returns all deprecated keys even though they are not set explicitly. This 
caused pig to print false warnings about deprecated keys. 

I think we should add a key to properties no matter it is deprecated or not. 
And iterator() shall only return what has been set to properties. This will 
solve the original problem presented in HADOOP-8167 (): did a set(dK, V) and 
expect, when iterating over the configuration to find (dK, V), without 
introducing false deprecation warnings.

To summarize, these are the expected behaviors with this change, suppose dK is 
deprecated by nK:
1) set(dK): will set both dK and nK to properties;
2) set(nK): will set nK, and if dK is present in properties, update it;
3) get(dK): because dK is deprecated, will call get(nK) instead;
4) get(nK): get nK from properties
5) unset(dK): unset both dK and nK
6) unset(nK): unset nK, and if dK was previously set, remove it from properties

> Configuration deprecation always emit "deprecated" warnings when a new key is 
> used
> ----------------------------------------------------------------------------------
>
>                 Key: HADOOP-10178
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10178
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.2.0
>            Reporter: shanyu zhao
>            Assignee: shanyu zhao
>         Attachments: HADOOP-10178-v2.patch, HADOOP-10178-v3.patch, 
> HADOOP-10178-v4.patch, HADOOP-10178-v5.patch, HADOOP-10178-v6.patch, 
> HADOOP-10178.patch
>
>
> Even if you use any new configuration properties, you still find "deprecated" 
> warnings in your logs. E.g.:
> 13/12/14 01:00:51 INFO Configuration.deprecation: mapred.input.dir.recursive 
> is deprecated. Instead, use 
> mapreduce.input.fileinputformat.input.dir.recursive



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to