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 e842b604e03 YARN-11913: Remove deprecated properties from 
yarn-default.xml
e842b604e03 is described below

commit e842b604e03d08309c95ec7454134a2307411fe5
Author: Chris Nauroth <[email protected]>
AuthorDate: Mon Jan 5 23:15:30 2026 +0000

    YARN-11913: Remove deprecated properties from yarn-default.xml
    
    Closes #8149
    
    Signed-off-by: Shilun Fan <[email protected]>
    Signed-off-by: Akira Ajisaka <[email protected]>
---
 .../src/main/resources/yarn-default.xml            |  9 ------
 .../hadoop/yarn/conf/TestYarnConfiguration.java    | 36 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 9 deletions(-)

diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml
index efef1e30e3d..f836adaf358 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml
@@ -1072,15 +1072,6 @@
     <value>/yarn/conf</value>
   </property>
 
-  <property>
-    <description>The setting that controls whether yarn system metrics is
-    published to the Timeline server (version one) or not, by RM.
-    This configuration is now deprecated in favor of
-    yarn.system-metrics-publisher.enabled.</description>
-    <name>yarn.resourcemanager.system-metrics-publisher.enabled</name>
-    <value>false</value>
-  </property>
-
   <property>
     <description>The setting that controls whether yarn system metrics is
     published on the Timeline service or not by RM And NM.</description>
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfiguration.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfiguration.java
index 3b76d41af79..c69ed03f6dd 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfiguration.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfiguration.java
@@ -19,13 +19,22 @@
 package org.apache.hadoop.yarn.conf;
 
 import java.net.InetSocketAddress;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.apache.commons.lang3.math.NumberUtils;
 import org.junit.jupiter.api.Test;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+
 import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotSame;
@@ -266,4 +275,31 @@ void checkRmAmExpiryIntervalSetting() throws Exception {
     assertTrue(NumberUtils.isDigits(rmAmExpiryIntervalMS1));
     assertEquals(600000, Long.parseLong(rmAmExpiryIntervalMS1));
   }
+
+  @Test
+  public void testNoDeprecationsByDefault() throws Exception {
+    // Force initialization to make sure deprecations are recorded for later 
calls to isDeprecated.
+    new YarnConfiguration();
+
+    // 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("/yarn-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 (YarnConfiguration.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]

Reply via email to