YARN-10297. TestContinuousScheduling#testFairSchedulerContinuousSchedulingInitTime fails intermittently. Contributed by Jim Brennan (Jim_Brennan)
(cherry picked from commit 0427100b75
)
This commit is contained in:
parent
b2c44db79e
commit
7190507aa2
|
@ -19,6 +19,7 @@
|
|||
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
|
||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||
|
@ -32,6 +33,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.MockRM;
|
|||
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ClusterNodeTracker;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics;
|
||||
import org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestUtils;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeAddedSchedulerEvent;
|
||||
|
@ -79,6 +81,9 @@ public class TestContinuousScheduling extends FairSchedulerTestBase {
|
|||
|
||||
@Before
|
||||
public void setup() {
|
||||
QueueMetrics.clearQueueMetrics();
|
||||
DefaultMetricsSystem.setMiniClusterMode(true);
|
||||
|
||||
mockClock = new ControlledClock();
|
||||
conf = createConfiguration();
|
||||
resourceManager = new MockRM(conf);
|
||||
|
|
|
@ -135,6 +135,7 @@ public class TestFairScheduler extends FairSchedulerTestBase {
|
|||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
DefaultMetricsSystem.setMiniClusterMode(true);
|
||||
scheduler = new FairScheduler();
|
||||
conf = createConfiguration();
|
||||
resourceManager = new MockRM(conf);
|
||||
|
|
Loading…
Reference in New Issue