YARN-4704. TestResourceManager#testResourceAllocation() fails when using FairScheduler. (Yufei Gu via kasha)

(cherry picked from commit 9dafaaaf0d)
This commit is contained in:
Karthik Kambatla 2016-02-29 16:09:53 -08:00
parent 3cb7ae11a8
commit 84172b047b
2 changed files with 10 additions and 0 deletions

View File

@ -181,6 +181,9 @@ Release 2.9.0 - UNRELEASED
YARN-4731. container-executor should not follow symlinks in YARN-4731. container-executor should not follow symlinks in
recursive_unlink_children (Colin Patrick McCabe via jlowe) recursive_unlink_children (Colin Patrick McCabe via jlowe)
YARN-4704. TestResourceManager#testResourceAllocation() fails when using
FairScheduler. (Yufei Gu via kasha)
Release 2.8.0 - UNRELEASED Release 2.8.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -39,6 +39,7 @@ import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException; import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptState; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptState;
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.AppAttemptRemovedSchedulerEvent; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.AppAttemptRemovedSchedulerEvent;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeAddedSchedulerEvent; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeAddedSchedulerEvent;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeUpdateSchedulerEvent; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeUpdateSchedulerEvent;
@ -57,6 +58,8 @@ public class TestResourceManager {
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
Configuration conf = new YarnConfiguration(); Configuration conf = new YarnConfiguration();
conf.set(YarnConfiguration.RM_SCHEDULER,
CapacityScheduler.class.getCanonicalName());
UserGroupInformation.setConfiguration(conf); UserGroupInformation.setConfiguration(conf);
resourceManager = new ResourceManager(); resourceManager = new ResourceManager();
resourceManager.init(conf); resourceManager.init(conf);
@ -261,6 +264,8 @@ public class TestResourceManager {
} }
}; };
Configuration conf = new YarnConfiguration(); Configuration conf = new YarnConfiguration();
conf.set(YarnConfiguration.RM_SCHEDULER,
CapacityScheduler.class.getCanonicalName());
conf.set(filterInitializerConfKey, filterInitializer); conf.set(filterInitializerConfKey, filterInitializer);
conf.set("hadoop.security.authentication", "kerberos"); conf.set("hadoop.security.authentication", "kerberos");
conf.set("hadoop.http.authentication.type", "kerberos"); conf.set("hadoop.http.authentication.type", "kerberos");
@ -295,6 +300,8 @@ public class TestResourceManager {
for (String filterInitializer : simpleFilterInitializers) { for (String filterInitializer : simpleFilterInitializers) {
resourceManager = new ResourceManager(); resourceManager = new ResourceManager();
Configuration conf = new YarnConfiguration(); Configuration conf = new YarnConfiguration();
conf.set(YarnConfiguration.RM_SCHEDULER,
CapacityScheduler.class.getCanonicalName());
conf.set(filterInitializerConfKey, filterInitializer); conf.set(filterInitializerConfKey, filterInitializer);
try { try {
UserGroupInformation.setConfiguration(conf); UserGroupInformation.setConfiguration(conf);