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

(cherry picked from commit 3fb4718886)
This commit is contained in:
Haibo Chen 2017-10-13 15:49:21 -07:00
parent 4d19e39fd7
commit 1134060678
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration;
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 class TestAMRMProxy extends BaseAMRMProxyE2ETest {
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();