[
https://issues.apache.org/jira/browse/HADOOP-9344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589174#comment-13589174
]
Jason Lowe commented on HADOOP-9344:
------------------------------------
Here's a simple way to demonstrate the issue:
{code}
public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();
conf.set("fs.defaultFS", "foobar");
conf.writeXml(System.out);
}
{code}
Even though the code only set {{fs.defaultFS}} the following warning is emitted:
{noformat}
2013-02-28 04:16:29,213 WARN [main] conf.Configuration
(Configuration.java:warnOnceIfDeprecated(823)) - fs.default.name is deprecated.
Instead, use fs.defaultFS
{noformat}
> Configuration.writeXml can warn about deprecated properties user did not set
> ----------------------------------------------------------------------------
>
> Key: HADOOP-9344
> URL: https://issues.apache.org/jira/browse/HADOOP-9344
> Project: Hadoop Common
> Issue Type: Bug
> Components: conf
> Affects Versions: 2.0.3-alpha, 0.23.5
> Reporter: Jason Lowe
>
> When the configuration is serialized it can emit warnings about deprecated
> properties that the user did not specify. Converting the config to XML
> causes all the properties in the config to be processed for deprecation, and
> after HADOOP-8167 setting a proper config property also causes the deprecated
> forms to be set. Processing all the keys in the config for deprecation
> therefore can trigger warnings for keys that were never specified by the
> user, leaving users confused as to how their code could be triggering these
> warnings.
--
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