YARN-150. Fixes AppRejectedTransition does not unregister a rejected app-attempt from the ApplicationMasterService (Contributed by Bikas Saha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1396429 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a5ebccd7bc
commit
0e2d93557e
@ -74,6 +74,9 @@ Release 2.0.3-alpha - Unreleased
|
|||||||
YARN-30. Fixed tests verifying web-services to work on JDK7. (Thomas Graves
|
YARN-30. Fixed tests verifying web-services to work on JDK7. (Thomas Graves
|
||||||
via vinodkv)
|
via vinodkv)
|
||||||
|
|
||||||
|
YARN-150. Fixes AppRejectedTransition does not unregister a rejected
|
||||||
|
app-attempt from the ApplicationMasterService (Bikas Saha via sseth)
|
||||||
|
|
||||||
Release 2.0.2-alpha - 2012-09-07
|
Release 2.0.2-alpha - 2012-09-07
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -591,6 +591,10 @@ public class RMAppAttemptImpl implements RMAppAttempt {
|
|||||||
|
|
||||||
RMAppAttemptRejectedEvent rejectedEvent = (RMAppAttemptRejectedEvent) event;
|
RMAppAttemptRejectedEvent rejectedEvent = (RMAppAttemptRejectedEvent) event;
|
||||||
|
|
||||||
|
// Tell the AMS. Unregister from the ApplicationMasterService
|
||||||
|
appAttempt.masterService
|
||||||
|
.unregisterAttempt(appAttempt.applicationAttemptId);
|
||||||
|
|
||||||
// Save the diagnostic message
|
// Save the diagnostic message
|
||||||
String message = rejectedEvent.getMessage();
|
String message = rejectedEvent.getMessage();
|
||||||
appAttempt.setDiagnostics(message);
|
appAttempt.setDiagnostics(message);
|
||||||
|
@ -262,6 +262,10 @@ public class TestRMAppAttemptTransitions {
|
|||||||
assertEquals(0, applicationAttempt.getRanNodes().size());
|
assertEquals(0, applicationAttempt.getRanNodes().size());
|
||||||
assertNull(applicationAttempt.getFinalApplicationStatus());
|
assertNull(applicationAttempt.getFinalApplicationStatus());
|
||||||
|
|
||||||
|
// Check events
|
||||||
|
verify(masterService).
|
||||||
|
unregisterAttempt(applicationAttempt.getAppAttemptId());
|
||||||
|
|
||||||
// this works for unmanaged and managed AM's because this is actually doing
|
// this works for unmanaged and managed AM's because this is actually doing
|
||||||
// verify(application).handle(anyObject());
|
// verify(application).handle(anyObject());
|
||||||
verify(application).handle(any(RMAppRejectedEvent.class));
|
verify(application).handle(any(RMAppRejectedEvent.class));
|
||||||
@ -527,7 +531,8 @@ public class TestRMAppAttemptTransitions {
|
|||||||
// launch AM and verify attempt failed
|
// launch AM and verify attempt failed
|
||||||
applicationAttempt.handle(new RMAppAttemptRegistrationEvent(
|
applicationAttempt.handle(new RMAppAttemptRegistrationEvent(
|
||||||
applicationAttempt.getAppAttemptId(), "host", 8042, "oldtrackingurl"));
|
applicationAttempt.getAppAttemptId(), "host", 8042, "oldtrackingurl"));
|
||||||
testAppAttemptSubmittedToFailedState("Unmanaged AM must register after AM attempt reaches LAUNCHED state.");
|
testAppAttemptSubmittedToFailedState(
|
||||||
|
"Unmanaged AM must register after AM attempt reaches LAUNCHED state.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user