|
@@ -236,8 +236,10 @@ public class TestNodeStatusUpdater {
|
|
|
firstContainerID, InetAddress.getByName("localhost")
|
|
|
.getCanonicalHostName(), 1234, user, resource,
|
|
|
currentTime + 10000, 123, "password".getBytes(), currentTime));
|
|
|
+ Context context = mock(Context.class);
|
|
|
+ when(context.getNMStateStore()).thenReturn(stateStore);
|
|
|
Container container = new ContainerImpl(conf, mockDispatcher,
|
|
|
- stateStore, launchContext, null, mockMetrics, containerToken);
|
|
|
+ launchContext, null, mockMetrics, containerToken, context);
|
|
|
this.context.getContainers().put(firstContainerID, container);
|
|
|
} else if (heartBeatID == 2) {
|
|
|
// Checks on the RM end
|
|
@@ -266,8 +268,10 @@ public class TestNodeStatusUpdater {
|
|
|
secondContainerID, InetAddress.getByName("localhost")
|
|
|
.getCanonicalHostName(), 1234, user, resource,
|
|
|
currentTime + 10000, 123, "password".getBytes(), currentTime));
|
|
|
+ Context context = mock(Context.class);
|
|
|
+ when(context.getNMStateStore()).thenReturn(stateStore);
|
|
|
Container container = new ContainerImpl(conf, mockDispatcher,
|
|
|
- stateStore, launchContext, null, mockMetrics, containerToken);
|
|
|
+ launchContext, null, mockMetrics, containerToken, context);
|
|
|
this.context.getContainers().put(secondContainerID, container);
|
|
|
} else if (heartBeatID == 3) {
|
|
|
// Checks on the RM end
|
|
@@ -883,8 +887,9 @@ public class TestNodeStatusUpdater {
|
|
|
BuilderUtils.newResource(1024, 1), 0, 123,
|
|
|
"password".getBytes(), 0);
|
|
|
Container anyCompletedContainer = new ContainerImpl(conf, null,
|
|
|
- null, null, null, null,
|
|
|
- BuilderUtils.newContainerTokenIdentifier(containerToken)) {
|
|
|
+ null, null, null,
|
|
|
+ BuilderUtils.newContainerTokenIdentifier(containerToken),
|
|
|
+ nm.getNMContext()) {
|
|
|
|
|
|
@Override
|
|
|
public ContainerState getCurrentState() {
|
|
@@ -904,8 +909,9 @@ public class TestNodeStatusUpdater {
|
|
|
1234, "anyUser", BuilderUtils.newResource(1024, 1), 0, 123,
|
|
|
"password".getBytes(), 0);
|
|
|
Container runningContainer =
|
|
|
- new ContainerImpl(conf, null, null, null, null, null,
|
|
|
- BuilderUtils.newContainerTokenIdentifier(runningContainerToken)) {
|
|
|
+ new ContainerImpl(conf, null, null, null, null,
|
|
|
+ BuilderUtils.newContainerTokenIdentifier(runningContainerToken),
|
|
|
+ nm.getNMContext()) {
|
|
|
@Override
|
|
|
public ContainerState getCurrentState() {
|
|
|
return ContainerState.RUNNING;
|
|
@@ -962,8 +968,9 @@ public class TestNodeStatusUpdater {
|
|
|
BuilderUtils.newResource(1024, 1), 0, 123,
|
|
|
"password".getBytes(), 0);
|
|
|
Container completedContainer = new ContainerImpl(conf, null,
|
|
|
- null, null, null, null,
|
|
|
- BuilderUtils.newContainerTokenIdentifier(containerToken)) {
|
|
|
+ null, null, null,
|
|
|
+ BuilderUtils.newContainerTokenIdentifier(containerToken),
|
|
|
+ nm.getNMContext()) {
|
|
|
@Override
|
|
|
public ContainerState getCurrentState() {
|
|
|
return ContainerState.COMPLETE;
|
|
@@ -999,8 +1006,9 @@ public class TestNodeStatusUpdater {
|
|
|
BuilderUtils.newResource(1024, 1), 0, 123,
|
|
|
"password".getBytes(), 0);
|
|
|
Container anyCompletedContainer = new ContainerImpl(conf, null,
|
|
|
- null, null, null, null,
|
|
|
- BuilderUtils.newContainerTokenIdentifier(containerToken)) {
|
|
|
+ null, null, null,
|
|
|
+ BuilderUtils.newContainerTokenIdentifier(containerToken),
|
|
|
+ nm.getNMContext()) {
|
|
|
|
|
|
@Override
|
|
|
public ContainerState getCurrentState() {
|