YARN-2452. TestRMApplicationHistoryWriter fails with FairScheduler. (Zhihai Xu via kasha)
This commit is contained in:
parent
b6fd5ccbce
commit
c50fc92502
|
@ -406,6 +406,9 @@ Release 2.6.0 - UNRELEASED
|
|||
YARN-2460. Remove obsolete entries from yarn-default.xml (Ray Chiang via
|
||||
aw)
|
||||
|
||||
YARN-2452. TestRMApplicationHistoryWriter fails with FairScheduler.
|
||||
(Zhihai Xu via kasha)
|
||||
|
||||
Release 2.5.1 - 2014-09-05
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -112,7 +112,7 @@ public class FairSchedulerConfiguration extends Configuration {
|
|||
protected static final int DEFAULT_WAIT_TIME_BEFORE_KILL = 15000;
|
||||
|
||||
/** Whether to assign multiple containers in one check-in. */
|
||||
protected static final String ASSIGN_MULTIPLE = CONF_PREFIX + "assignmultiple";
|
||||
public static final String ASSIGN_MULTIPLE = CONF_PREFIX + "assignmultiple";
|
||||
protected static final boolean DEFAULT_ASSIGN_MULTIPLE = false;
|
||||
|
||||
/** Whether to give more weight to apps requiring many resources. */
|
||||
|
|
|
@ -60,6 +60,9 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState;
|
|||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptState;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairSchedulerConfiguration;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
@ -369,10 +372,29 @@ public class TestRMApplicationHistoryWriter {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRMWritingMassiveHistory() throws Exception {
|
||||
public void testRMWritingMassiveHistoryForFairSche() throws Exception {
|
||||
//test WritingMassiveHistory for Fair Scheduler.
|
||||
testRMWritingMassiveHistory(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRMWritingMassiveHistoryForCapacitySche() throws Exception {
|
||||
//test WritingMassiveHistory for Capacity Scheduler.
|
||||
testRMWritingMassiveHistory(false);
|
||||
}
|
||||
|
||||
private void testRMWritingMassiveHistory(boolean isFS) throws Exception {
|
||||
// 1. Show RM can run with writing history data
|
||||
// 2. Test additional workload of processing history events
|
||||
YarnConfiguration conf = new YarnConfiguration();
|
||||
if (isFS) {
|
||||
conf.setBoolean(FairSchedulerConfiguration.ASSIGN_MULTIPLE, true);
|
||||
conf.set("yarn.resourcemanager.scheduler.class",
|
||||
FairScheduler.class.getName());
|
||||
} else {
|
||||
conf.set("yarn.resourcemanager.scheduler.class",
|
||||
CapacityScheduler.class.getName());
|
||||
}
|
||||
// don't process history events
|
||||
MockRM rm = new MockRM(conf) {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue