YARN-8184. Too many metrics if containerLocalizer/ResourceLocalizationService uses ReadWriteDiskValidator. Contributed by Yufei Gu

This commit is contained in:
Yufei Gu 2018-06-22 14:02:32 -07:00
parent ae055622ed
commit 1cdce86d33
2 changed files with 2 additions and 8 deletions

View File

@ -132,10 +132,7 @@ public class ContainerLocalizer {
this.recordFactory = recordFactory; this.recordFactory = recordFactory;
this.conf = new YarnConfiguration(); this.conf = new YarnConfiguration();
this.diskValidator = DiskValidatorFactory.getInstance( this.diskValidator = DiskValidatorFactory.getInstance(
conf.get(YarnConfiguration.DISK_VALIDATOR, YarnConfiguration.DEFAULT_DISK_VALIDATOR);
YarnConfiguration.DEFAULT_DISK_VALIDATOR));
LOG.info("Disk Validator: " + YarnConfiguration.DISK_VALIDATOR +
" is loaded.");
this.appCacheDirContextName = String.format(APPCACHE_CTXT_FMT, appId); this.appCacheDirContextName = String.format(APPCACHE_CTXT_FMT, appId);
this.pendingResources = new HashMap<LocalResource,Future<Path>>(); this.pendingResources = new HashMap<LocalResource,Future<Path>>();
} }

View File

@ -264,10 +264,7 @@ public class ResourceLocalizationService extends CompositeService
} }
diskValidator = DiskValidatorFactory.getInstance( diskValidator = DiskValidatorFactory.getInstance(
conf.get(YarnConfiguration.DISK_VALIDATOR, YarnConfiguration.DEFAULT_DISK_VALIDATOR);
YarnConfiguration.DEFAULT_DISK_VALIDATOR));
LOG.info("Disk Validator: " + YarnConfiguration.DISK_VALIDATOR +
" is loaded.");
cacheTargetSize = cacheTargetSize =
conf.getLong(YarnConfiguration.NM_LOCALIZER_CACHE_TARGET_SIZE_MB, YarnConfiguration.DEFAULT_NM_LOCALIZER_CACHE_TARGET_SIZE_MB) << 20; conf.getLong(YarnConfiguration.NM_LOCALIZER_CACHE_TARGET_SIZE_MB, YarnConfiguration.DEFAULT_NM_LOCALIZER_CACHE_TARGET_SIZE_MB) << 20;
cacheCleanupPeriod = cacheCleanupPeriod =