Skip to content

Commit

Permalink
YARN-11705. Turn off Node Manager working directories validation by d…
Browse files Browse the repository at this point in the history
…efault (#6948)

Change-Id: I011c13c79719be97c7ebc028804f1fdab5eb34c4
  • Loading branch information
K0K0V0K authored Jul 18, 2024
1 parent ebbe962 commit 9a9ad6c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,4 +726,9 @@ private void setGoodDirsDiskUtilizationPercentage() {
public int getGoodDirsDiskUtilizationPercentage() {
return goodDirsDiskUtilizationPercentage;
}

@VisibleForTesting
public void setSubAccessibilityValidationEnabled(boolean subAccessibilityValidationEnabled) {
this.subAccessibilityValidationEnabled = subAccessibilityValidationEnabled;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 9a9ad6c

Please sign in to comment.