YARN-11081. TestYarnConfigurationFields consistently keeps failing (#4027)

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
Viraj Jasani 2022-03-08 18:02:51 +05:30 committed by GitHub
parent 49e4e4d0a5
commit 56d807175d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -4846,4 +4846,17 @@
<name>yarn.resourcemanager.enable-node-untracked-without-include-path</name>
<value>false</value>
</property>
<property>
<name>yarn.scheduler.app-placement-allocator.class</name>
<value></value>
<description>
In the absence of APPLICATION_PLACEMENT_TYPE_CLASS from the RM
application scheduling environments, the value of this config
is used to determine the default implementation of AppPlacementAllocator.
If APPLICATION_PLACEMENT_TYPE_CLASS is absent from the application
scheduling env and this config also has no value present, then
default implementation LocalityAppPlacementAllocator is used.
</description>
</property>
</configuration>

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Unstable;
import org.apache.hadoop.util.ReflectionUtils;
@ -45,7 +46,7 @@ public class ApplicationPlacementAllocatorFactory {
SchedulerRequestKey schedulerRequestKey, RMContext rmContext) {
Class<?> policyClass;
try {
if (appPlacementAllocatorName == null) {
if (StringUtils.isEmpty(appPlacementAllocatorName)) {
policyClass = ApplicationSchedulingConfig.DEFAULT_APPLICATION_PLACEMENT_TYPE_CLASS;
} else {
policyClass = Class.forName(appPlacementAllocatorName);