[
https://issues.apache.org/jira/browse/HADOOP-19763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048585#comment-18048585
]
ASF GitHub Bot commented on HADOOP-19763:
-----------------------------------------
zabetak commented on code in PR #8148:
URL: https://github.com/apache/hadoop/pull/8148#discussion_r2655650905
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationDeprecation.java:
##########
@@ -465,4 +472,30 @@ public void testGetPropertyBeforeDeprecetionsAreSet()
throws Exception {
"Property should be accessible through new key");
}
+ @Test
+ public void testNoDeprecationsByDefault() throws Exception {
+ // Force initialization to make sure deprecations are recorded for later
calls to isDeprecated.
+ new Configuration();
Review Comment:
The test looks good although it can't find all deprecated properties (e.g.,
`io.bytes.per.checksum`) cause the respective config classes are not loaded. I
logged HADOOP-19769 which may be a more complete solution to avoid deprecated
props in config files. Obviously, this PR is already good enough and we don't
need to strictly wait for HADOOP-19769. If there is interest about HADOOP-19769
let me know and I will try to finalize the POC.
> Remove deprecated properties from core-default.xml
> --------------------------------------------------
>
> Key: HADOOP-19763
> URL: https://issues.apache.org/jira/browse/HADOOP-19763
> Project: Hadoop Common
> Issue Type: Bug
> Components: conf
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Priority: Major
> Labels: pull-request-available
>
> Recent trunk changes now produce more assertive warnings about use of
> deprecated configuration properties. With some of these deprecated properties
> included in core-default.xml, that means every process launched logs the
> warnings. Remove them from core-default.xml to avoid these warnings. (Note
> that this does not take the step of actually removing the code that uses the
> deprecated properties. They'll continue to work. We just don't want warnings
> logged by default if the user didn't specifically use these properties.)
> {code}
> hadoop fs -ls /
> 2025-12-26 23:17:33,154 INFO Configuration.deprecation: fs.default.name in
> core-default.xml is deprecated. Instead, use fs.defaultFS
> 2025-12-26 23:17:33,307 INFO Configuration.deprecation: io.bytes.per.checksum
> in core-default.xml is deprecated. Instead, use dfs.bytes-per-checksum
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]