From 78e98c87b21a11b460df8f929457110c32ab838d Mon Sep 17 00:00:00 2001 From: Wanqiang Ji Date: Sat, 29 Jun 2019 21:25:35 +0800 Subject: [PATCH] YARN-9653. Remove deprecated config from yarn-default.xml --- .../apache/hadoop/yarn/conf/YarnConfiguration.java | 12 ------------ .../yarn/conf/TestYarnConfigurationFields.java | 3 --- .../distributedshell/TestDistributedShell.java | 2 +- .../src/main/resources/yarn-default.xml | 9 --------- .../src/site/markdown/TimelineServer.md | 6 +++--- 5 files changed, 4 insertions(+), 28 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 3fb4a3765d1..6914e7cf6d7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -109,8 +109,6 @@ private static void addDeprecatedKeys() { NM_CLIENT_MAX_NM_PROXIES) }); Configuration.addDeprecations(new DeprecationDelta[] { - new DeprecationDelta(RM_SYSTEM_METRICS_PUBLISHER_ENABLED, - SYSTEM_METRICS_PUBLISHER_ENABLED), new DeprecationDelta(RM_ZK_ACL, CommonConfigurationKeys.ZK_ACL), new DeprecationDelta(RM_ZK_AUTH, CommonConfigurationKeys.ZK_AUTH), new DeprecationDelta(RM_ZK_ADDRESS, @@ -656,16 +654,6 @@ public static boolean isAclEnabled(Configuration conf) { public static final int DEFAULT_RM_HISTORY_WRITER_MULTI_THREADED_DISPATCHER_POOL_SIZE = 10; - /** - * The setting that controls whether yarn system metrics is published on the - * timeline server or not by RM. This configuration setting is for ATS V1. - * This is now deprecated in favor of SYSTEM_METRICS_PUBLISHER_ENABLED. - */ - public static final String RM_SYSTEM_METRICS_PUBLISHER_ENABLED = RM_PREFIX - + "system-metrics-publisher.enabled"; - public static final boolean DEFAULT_RM_SYSTEM_METRICS_PUBLISHER_ENABLED = - false; - /** * The setting that controls whether yarn system metrics is published on the * timeline server or not by RM and NM. This configuration setting is for diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java index 6f781fa7c0d..1027ab868eb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java @@ -137,9 +137,6 @@ public void initializeMemberVariables() { // Ignore all YARN Application Timeline Service (version 1) properties configurationPrefixToSkipCompare.add("yarn.timeline-service."); - // skip deprecated RM_SYSTEM_METRICS_PUBLISHER_ENABLED - configurationPropsToSkipCompare - .add(YarnConfiguration.RM_SYSTEM_METRICS_PUBLISHER_ENABLED); // skip deprecated ZooKeeper settings configurationPropsToSkipCompare.add(YarnConfiguration.RM_ZK_ADDRESS); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDistributedShell.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDistributedShell.java index ba7bf7a560d..c379ad63279 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDistributedShell.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDistributedShell.java @@ -180,7 +180,7 @@ private void setupInternal(int numNodeManager, float timelineVersion) conf.setBoolean( YarnConfiguration.YARN_MINICLUSTER_CONTROL_RESOURCE_MONITORING, true); - conf.setBoolean(YarnConfiguration.RM_SYSTEM_METRICS_PUBLISHER_ENABLED, + conf.setBoolean(YarnConfiguration.SYSTEM_METRICS_PUBLISHER_ENABLED, true); conf.setBoolean( YarnConfiguration.OPPORTUNISTIC_CONTAINER_ALLOCATION_ENABLED, true); 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 7e52dd151cd..65d35fb71d8 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 @@ -870,15 +870,6 @@ /yarn/conf - - 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. - yarn.resourcemanager.system-metrics-publisher.enabled - false - - The setting that controls whether yarn system metrics is published on the Timeline service or not by RM And NM. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/TimelineServer.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/TimelineServer.md index a326f45d9f9..71c52f69161 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/TimelineServer.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/TimelineServer.md @@ -129,7 +129,7 @@ and cluster operators. | Configuration Property | Description | |:---- |:---- | | `yarn.timeline-service.enabled` | In the server side it indicates whether timeline service is enabled or not. And in the client side, users can enable it to indicate whether client wants to use timeline service. If it's enabled in the client side along with security, then yarn client tries to fetch the delegation tokens for the timeline server. Defaults to `false`. | -| `yarn.resourcemanager.system-metrics-publisher.enabled` | The setting that controls whether or not YARN system metrics are published on the timeline server by RM. Defaults to `false`. | +| `yarn.system-metrics-publisher.enabled` | The setting that controls whether or not YARN system metrics are published on the timeline server by RM. Defaults to `false`. | | `yarn.timeline-service.generic-application-history.enabled` | Indicate to clients whether to query generic application data from timeline history-service or not. If not enabled then application data is queried only from Resource Manager. Defaults to `false`. | #### Timeline store and state store configuration @@ -220,8 +220,8 @@ to `kerberos`, after which the following configuration options are available: The setting that controls whether yarn system metrics is - published on the timeline server or not by RM. - yarn.resourcemanager.system-metrics-publisher.enabled + published on the Timeline service or not by RM And NM. + yarn.system-metrics-publisher.enabled true -- 2.21.0 (Apple Git-120)