YARN-5023. TestAMRestart#testShouldNotCountFailureToMaxAttemptRetry fails. Contributed by sandflee
(cherry picked from commit c35a5a7a8d
)
This commit is contained in:
parent
2c6e7f221e
commit
4437e6f336
|
@ -864,6 +864,10 @@ public class MockRM extends ResourceManager {
|
||||||
rm.getResourceScheduler()).getApplicationAttempt(attemptId));
|
rm.getResourceScheduler()).getApplicationAttempt(attemptId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: nm.nodeHeartbeat is explicitly invoked,
|
||||||
|
* don't invoke it before calling launchAM
|
||||||
|
*/
|
||||||
public static MockAM launchAM(RMApp app, MockRM rm, MockNM nm)
|
public static MockAM launchAM(RMApp app, MockRM rm, MockNM nm)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
RMAppAttempt attempt = waitForAttemptScheduled(app, rm);
|
RMAppAttempt attempt = waitForAttemptScheduled(app, rm);
|
||||||
|
|
|
@ -212,8 +212,6 @@ public class TestRM extends ParameterizedSchedulerTestBase {
|
||||||
CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
|
CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
|
||||||
cs.getApplicationAttempt(attempt.getAppAttemptId()).getNewContainerId();
|
cs.getApplicationAttempt(attempt.getAppAttemptId()).getNewContainerId();
|
||||||
|
|
||||||
// kick the scheduling
|
|
||||||
nm1.nodeHeartbeat(true);
|
|
||||||
MockAM am = MockRM.launchAM(app, rm, nm1);
|
MockAM am = MockRM.launchAM(app, rm, nm1);
|
||||||
// am container Id not equal to 1.
|
// am container Id not equal to 1.
|
||||||
Assert.assertTrue(
|
Assert.assertTrue(
|
||||||
|
|
|
@ -627,7 +627,6 @@ public class TestAMRestart {
|
||||||
appState.getAttempt(am4.getApplicationAttemptId())
|
appState.getAttempt(am4.getApplicationAttemptId())
|
||||||
.getAMContainerExitStatus());
|
.getAMContainerExitStatus());
|
||||||
// launch next AM in nm2
|
// launch next AM in nm2
|
||||||
nm2.nodeHeartbeat(true);
|
|
||||||
MockAM am5 =
|
MockAM am5 =
|
||||||
rm1.waitForNewAMToLaunchAndRegister(app1.getApplicationId(), 5, nm2);
|
rm1.waitForNewAMToLaunchAndRegister(app1.getApplicationId(), 5, nm2);
|
||||||
RMAppAttempt attempt5 = app1.getCurrentAppAttempt();
|
RMAppAttempt attempt5 = app1.getCurrentAppAttempt();
|
||||||
|
|
Loading…
Reference in New Issue