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 9503d47537..5cab8c0a9b 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 @@ -2189,7 +2189,7 @@ public static boolean isAclEnabled(Configuration conf) { NM_DISK_HEALTH_CHECK_PREFIX + "working-dir-content-accessibility-validation.enabled"; public static final boolean DEFAULT_NM_WORKING_DIR_CONTENT_ACCESSIBILITY_VALIDATION_ENABLED = - true; + false; /** The health checker scripts. */ public static final String NM_HEALTH_CHECK_SCRIPTS = 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 ac976b7472..476789637e 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 @@ -1998,7 +1998,7 @@ Validate content of the node manager directories can be accessed yarn.nodemanager.disk-health-checker.working-dir-content-accessibility-validation.enabled - true + false diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DirectoryCollection.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DirectoryCollection.java index a5657ab48b..8d8e0325bd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DirectoryCollection.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DirectoryCollection.java @@ -726,4 +726,9 @@ private void setGoodDirsDiskUtilizationPercentage() { public int getGoodDirsDiskUtilizationPercentage() { return goodDirsDiskUtilizationPercentage; } + + @VisibleForTesting + public void setSubAccessibilityValidationEnabled(boolean subAccessibilityValidationEnabled) { + this.subAccessibilityValidationEnabled = subAccessibilityValidationEnabled; + } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDirectoryCollection.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDirectoryCollection.java index 0193f844ac..4dbab5be8c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDirectoryCollection.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDirectoryCollection.java @@ -528,6 +528,7 @@ public void testNonAccessibleSub() throws IOException { Files.setPosixFilePermissions(testFile.toPath(), PosixFilePermissions.fromString("-w--w--w-")); DirectoryCollection dc = new DirectoryCollection(new String[]{testDir.toString()}); + dc.setSubAccessibilityValidationEnabled(true); Map diskErrorInformationMap = dc.testDirs(Collections.singletonList(testDir.toString()), Collections.emptySet()); Assert.assertEquals(1, diskErrorInformationMap.size());