YARN-11705. Turn off Node Manager working directories validation by default (#6948)

Change-Id: I011c13c79719be97c7ebc028804f1fdab5eb34c4
This commit is contained in:
K0K0V0K 2024-07-18 16:55:40 +02:00 committed by GitHub
parent ebbe9628d3
commit 9a9ad6cc98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 2 deletions

View File

@ -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 =

View File

@ -1998,7 +1998,7 @@
<property>
<description>Validate content of the node manager directories can be accessed</description>
<name>yarn.nodemanager.disk-health-checker.working-dir-content-accessibility-validation.enabled</name>
<value>true</value>
<value>false</value>
</property>
<property>

View File

@ -726,4 +726,9 @@ private void setGoodDirsDiskUtilizationPercentage() {
public int getGoodDirsDiskUtilizationPercentage() {
return goodDirsDiskUtilizationPercentage;
}
@VisibleForTesting
public void setSubAccessibilityValidationEnabled(boolean subAccessibilityValidationEnabled) {
this.subAccessibilityValidationEnabled = subAccessibilityValidationEnabled;
}
}

View File

@ -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<String, DirectoryCollection.DiskErrorInformation> diskErrorInformationMap =
dc.testDirs(Collections.singletonList(testDir.toString()), Collections.emptySet());
Assert.assertEquals(1, diskErrorInformationMap.size());