YARN-2453. TestProportionalCapacityPreemptionPolicy fails with FairScheduler. (Zhihai Xu via kasha)
(cherry picked from commit 9721e2c1fe
)
This commit is contained in:
parent
1fe3086bdb
commit
c1a3819a4d
|
@ -379,6 +379,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
YARN-2452. TestRMApplicationHistoryWriter fails with FairScheduler.
|
YARN-2452. TestRMApplicationHistoryWriter fails with FairScheduler.
|
||||||
(Zhihai Xu via kasha)
|
(Zhihai Xu via kasha)
|
||||||
|
|
||||||
|
YARN-2453. TestProportionalCapacityPreemptionPolicy fails with
|
||||||
|
FairScheduler. (Zhihai Xu via kasha)
|
||||||
|
|
||||||
Release 2.5.1 - 2014-09-05
|
Release 2.5.1 - 2014-09-05
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -112,6 +112,13 @@ public class TestProportionalCapacityPreemptionPolicy {
|
||||||
// report "ideal" preempt
|
// report "ideal" preempt
|
||||||
conf.setFloat(TOTAL_PREEMPTION_PER_ROUND, (float) 1.0);
|
conf.setFloat(TOTAL_PREEMPTION_PER_ROUND, (float) 1.0);
|
||||||
conf.setFloat(NATURAL_TERMINATION_FACTOR, (float) 1.0);
|
conf.setFloat(NATURAL_TERMINATION_FACTOR, (float) 1.0);
|
||||||
|
conf.set(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES,
|
||||||
|
ProportionalCapacityPreemptionPolicy.class.getCanonicalName());
|
||||||
|
conf.setBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, true);
|
||||||
|
// FairScheduler doesn't support this test,
|
||||||
|
// Set CapacityScheduler as the scheduler for this test.
|
||||||
|
conf.set("yarn.resourcemanager.scheduler.class",
|
||||||
|
CapacityScheduler.class.getName());
|
||||||
|
|
||||||
mClock = mock(Clock.class);
|
mClock = mock(Clock.class);
|
||||||
mCS = mock(CapacityScheduler.class);
|
mCS = mock(CapacityScheduler.class);
|
||||||
|
@ -441,11 +448,6 @@ public class TestProportionalCapacityPreemptionPolicy {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPolicyInitializeAfterSchedulerInitialized() {
|
public void testPolicyInitializeAfterSchedulerInitialized() {
|
||||||
Configuration conf = new Configuration();
|
|
||||||
conf.set(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES,
|
|
||||||
ProportionalCapacityPreemptionPolicy.class.getCanonicalName());
|
|
||||||
conf.setBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, true);
|
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
MockRM rm = new MockRM(conf);
|
MockRM rm = new MockRM(conf);
|
||||||
rm.init(conf);
|
rm.init(conf);
|
||||||
|
|
Loading…
Reference in New Issue