From 1cdce86d33d4b73ba6dd4136c966eb7e822b6f36 Mon Sep 17 00:00:00 2001 From: Yufei Gu Date: Fri, 22 Jun 2018 14:02:32 -0700 Subject: [PATCH] YARN-8184. Too many metrics if containerLocalizer/ResourceLocalizationService uses ReadWriteDiskValidator. Contributed by Yufei Gu --- .../containermanager/localizer/ContainerLocalizer.java | 5 +---- .../localizer/ResourceLocalizationService.java | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java index 6a384aeff48..c0343692a07 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java @@ -132,10 +132,7 @@ public class ContainerLocalizer { this.recordFactory = recordFactory; this.conf = new YarnConfiguration(); this.diskValidator = DiskValidatorFactory.getInstance( - conf.get(YarnConfiguration.DISK_VALIDATOR, - YarnConfiguration.DEFAULT_DISK_VALIDATOR)); - LOG.info("Disk Validator: " + YarnConfiguration.DISK_VALIDATOR + - " is loaded."); + YarnConfiguration.DEFAULT_DISK_VALIDATOR); this.appCacheDirContextName = String.format(APPCACHE_CTXT_FMT, appId); this.pendingResources = new HashMap>(); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java index ddae2ae2727..3f0a6fb0a4f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java @@ -264,10 +264,7 @@ public class ResourceLocalizationService extends CompositeService } diskValidator = DiskValidatorFactory.getInstance( - conf.get(YarnConfiguration.DISK_VALIDATOR, - YarnConfiguration.DEFAULT_DISK_VALIDATOR)); - LOG.info("Disk Validator: " + YarnConfiguration.DISK_VALIDATOR + - " is loaded."); + YarnConfiguration.DEFAULT_DISK_VALIDATOR); cacheTargetSize = conf.getLong(YarnConfiguration.NM_LOCALIZER_CACHE_TARGET_SIZE_MB, YarnConfiguration.DEFAULT_NM_LOCALIZER_CACHE_TARGET_SIZE_MB) << 20; cacheCleanupPeriod =