This is an automated email from the ASF dual-hosted git repository.
cnauroth pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new acf5d503edf HADOOP-19763: Remove deprecated properties from
core-default.xml
acf5d503edf is described below
commit acf5d503edf6e15fbcc79d7f4abc5c9cc7019359
Author: Chris Nauroth <[email protected]>
AuthorDate: Mon Jan 5 23:10:11 2026 +0000
HADOOP-19763: Remove deprecated properties from core-default.xml
Closes #8148
Signed-off-by: Akira Ajisaka <[email protected]>
Signed-off-by: Shilun Fan <[email protected]>
Reviewed-by: Stamatis Zampetakis <[email protected]>
---
.../src/main/resources/core-default.xml | 14 ---------
.../hadoop/conf/TestConfigurationDeprecation.java | 33 ++++++++++++++++++++++
2 files changed, 33 insertions(+), 14 deletions(-)
diff --git
a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
index 3c14cda5684..9859b8b94a4 100644
--- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
+++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
@@ -891,13 +891,6 @@
</description>
</property>
-<property>
- <name>io.bytes.per.checksum</name>
- <value>512</value>
- <description>The number of bytes per checksum. Must not be larger than
- io.file.buffer.size.</description>
-</property>
-
<property>
<name>io.skip.checksum.errors</name>
<value>false</value>
@@ -1097,13 +1090,6 @@
determine the host, port, etc. for a filesystem.</description>
</property>
-<property>
- <name>fs.default.name</name>
- <value>file:///</value>
- <description>Deprecated. Use (fs.defaultFS) property
- instead</description>
-</property>
-
<property>
<name>fs.trash.interval</name>
<value>0</value>
diff --git
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationDeprecation.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationDeprecation.java
index 2db0d52bd97..5850a76a4c8 100644
---
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationDeprecation.java
+++
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationDeprecation.java
@@ -18,6 +18,7 @@
package org.apache.hadoop.conf;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -26,7 +27,9 @@
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStream;
import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -36,6 +39,8 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.hadoop.fs.CommonConfigurationKeys;
@@ -49,6 +54,8 @@
import
org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder;
import
org.apache.hadoop.thirdparty.com.google.common.util.concurrent.Uninterruptibles;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
public class TestConfigurationDeprecation {
private Configuration conf;
@@ -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();
+
+ // This test directly parses the default XML configuration file to check
for deprecated
+ // properties, bypassing normalization logic in the Configuration class
that might hide them.
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ List<String> deprecatedProps = new ArrayList<>();
+
+ try (InputStream is = getClass().getResourceAsStream("/core-default.xml"))
{
+ Document doc = db.parse(is);
+ NodeList props = doc.getElementsByTagName("name");
+ for (int i = 0; i < props.getLength(); ++i) {
+ String prop = props.item(i).getTextContent();
+ if (Configuration.isDeprecated(prop)) {
+ deprecatedProps.add(prop);
+ }
+ }
+ }
+
+ assertThat(deprecatedProps)
+ .as("By default, deprecated properties should be empty: %s",
deprecatedProps)
+ .isEmpty();
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]