YARN-7310. TestAMRMProxy#testAMRMProxyE2E fails with FairScheduler. (Robert Kanter via Haibo Chen)

This commit is contained in:
Haibo Chen 2017-10-13 15:49:21 -07:00
parent 8dd1eeb94f
commit 3fb4718886

View File

@ -44,6 +44,7 @@
import org.apache.hadoop.yarn.server.MiniYARNCluster;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairSchedulerConfiguration;
import org.junit.Assert;
import org.junit.Test;
@ -67,6 +68,9 @@ public void testAMRMProxyE2E() throws Exception {
YarnClient rmClient = YarnClient.createYarnClient()) {
Configuration conf = new YarnConfiguration();
conf.setBoolean(YarnConfiguration.AMRM_PROXY_ENABLED, true);
// Make sure if using FairScheduler that we can assign multiple containers
// in a single heartbeat later
conf.setBoolean(FairSchedulerConfiguration.ASSIGN_MULTIPLE, true);
cluster.init(conf);
cluster.start();
final Configuration yarnConf = cluster.getConfig();