YARN-11705. Turn off Node Manager working directories validation by default (#6948)
Change-Id: I011c13c79719be97c7ebc028804f1fdab5eb34c4
This commit is contained in:
parent
ebbe9628d3
commit
9a9ad6cc98
@ -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 =
|
||||
|
@ -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>
|
||||
|
@ -726,4 +726,9 @@ private void setGoodDirsDiskUtilizationPercentage() {
|
||||
public int getGoodDirsDiskUtilizationPercentage() {
|
||||
return goodDirsDiskUtilizationPercentage;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setSubAccessibilityValidationEnabled(boolean subAccessibilityValidationEnabled) {
|
||||
this.subAccessibilityValidationEnabled = subAccessibilityValidationEnabled;
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user