|
@@ -956,7 +956,8 @@ public class TestRMAppAttemptTransitions {
|
|
|
int exitCode = 123;
|
|
|
ContainerStatus cs =
|
|
|
BuilderUtils.newContainerStatus(amContainer.getId(),
|
|
|
- ContainerState.COMPLETE, containerDiagMsg, exitCode);
|
|
|
+ ContainerState.COMPLETE, containerDiagMsg, exitCode,
|
|
|
+ amContainer.getResource());
|
|
|
NodeId anyNodeId = NodeId.newInstance("host", 1234);
|
|
|
applicationAttempt.handle(new RMAppAttemptContainerFinishedEvent(
|
|
|
applicationAttempt.getAppAttemptId(), cs, anyNodeId));
|
|
@@ -980,7 +981,8 @@ public class TestRMAppAttemptTransitions {
|
|
|
String containerDiagMsg = "some error";
|
|
|
int exitCode = 123;
|
|
|
ContainerStatus cs = BuilderUtils.newContainerStatus(amContainer.getId(),
|
|
|
- ContainerState.COMPLETE, containerDiagMsg, exitCode);
|
|
|
+ ContainerState.COMPLETE, containerDiagMsg, exitCode,
|
|
|
+ amContainer.getResource());
|
|
|
ApplicationAttemptId appAttemptId = applicationAttempt.getAppAttemptId();
|
|
|
NodeId anyNodeId = NodeId.newInstance("host", 1234);
|
|
|
applicationAttempt.handle(new RMAppAttemptContainerFinishedEvent(
|
|
@@ -992,7 +994,8 @@ public class TestRMAppAttemptTransitions {
|
|
|
applicationAttempt.getAppAttemptState());
|
|
|
applicationAttempt.handle(new RMAppAttemptContainerFinishedEvent(
|
|
|
applicationAttempt.getAppAttemptId(), BuilderUtils.newContainerStatus(
|
|
|
- amContainer.getId(), ContainerState.COMPLETE, "", 0), anyNodeId));
|
|
|
+ amContainer.getId(), ContainerState.COMPLETE, "", 0,
|
|
|
+ amContainer.getResource()), anyNodeId));
|
|
|
applicationAttempt.handle(new RMAppAttemptEvent(
|
|
|
applicationAttempt.getAppAttemptId(), RMAppAttemptEventType.EXPIRE));
|
|
|
assertEquals(RMAppAttemptState.FINAL_SAVING,
|
|
@@ -1030,7 +1033,8 @@ public class TestRMAppAttemptTransitions {
|
|
|
NodeId anyNodeId = NodeId.newInstance("host", 1234);
|
|
|
applicationAttempt.handle(new RMAppAttemptContainerFinishedEvent(
|
|
|
applicationAttempt.getAppAttemptId(), BuilderUtils.newContainerStatus(
|
|
|
- amContainer.getId(), ContainerState.COMPLETE, "", 0), anyNodeId));
|
|
|
+ amContainer.getId(), ContainerState.COMPLETE, "", 0,
|
|
|
+ amContainer.getResource()), anyNodeId));
|
|
|
applicationAttempt.handle(new RMAppAttemptEvent(
|
|
|
applicationAttempt.getAppAttemptId(), RMAppAttemptEventType.EXPIRE));
|
|
|
assertEquals(RMAppAttemptState.FINAL_SAVING,
|
|
@@ -1207,7 +1211,8 @@ public class TestRMAppAttemptTransitions {
|
|
|
BuilderUtils.newContainerStatus(
|
|
|
BuilderUtils.newContainerId(
|
|
|
applicationAttempt.getAppAttemptId(), 42),
|
|
|
- ContainerState.COMPLETE, "", 0), anyNodeId));
|
|
|
+ ContainerState.COMPLETE, "", 0,
|
|
|
+ amContainer.getResource()), anyNodeId));
|
|
|
testAppAttemptFinishingState(amContainer, finalStatus, trackingUrl,
|
|
|
diagnostics);
|
|
|
}
|
|
@@ -1227,7 +1232,8 @@ public class TestRMAppAttemptTransitions {
|
|
|
new RMAppAttemptContainerFinishedEvent(
|
|
|
applicationAttempt.getAppAttemptId(),
|
|
|
BuilderUtils.newContainerStatus(amContainer.getId(),
|
|
|
- ContainerState.COMPLETE, "", 0), anyNodeId));
|
|
|
+ ContainerState.COMPLETE, "", 0,
|
|
|
+ amContainer.getResource()), anyNodeId));
|
|
|
testAppAttemptFinishedState(amContainer, finalStatus, trackingUrl,
|
|
|
diagnostics, 0, false);
|
|
|
}
|
|
@@ -1256,7 +1262,8 @@ public class TestRMAppAttemptTransitions {
|
|
|
NodeId anyNodeId = NodeId.newInstance("host", 1234);
|
|
|
applicationAttempt.handle(new RMAppAttemptContainerFinishedEvent(
|
|
|
applicationAttempt.getAppAttemptId(), BuilderUtils.newContainerStatus(
|
|
|
- amContainer.getId(), ContainerState.COMPLETE, "", 0), anyNodeId));
|
|
|
+ amContainer.getId(), ContainerState.COMPLETE, "", 0,
|
|
|
+ amContainer.getResource()), anyNodeId));
|
|
|
assertEquals(RMAppAttemptState.FINAL_SAVING,
|
|
|
applicationAttempt.getAppAttemptState());
|
|
|
// send attempt_saved
|