diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/NMClientAsyncImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/NMClientAsyncImpl.java index 9cd653bed4b..c7c94bce398 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/NMClientAsyncImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/NMClientAsyncImpl.java @@ -310,7 +310,7 @@ public void updateContainerResourceAsync(Container container) { @Override public void reInitializeContainerAsync(ContainerId containerId, - ContainerLaunchContext containerLaunchContex, boolean autoCommit){ + ContainerLaunchContext containerLaunchContext, boolean autoCommit){ if (!(callbackHandler instanceof AbstractCallbackHandler)) { LOG.error("Callback handler does not implement container re-initialize " + "callback methods"); @@ -323,9 +323,9 @@ public void reInitializeContainerAsync(ContainerId containerId, "Container " + containerId + " is not started")); } try { - events.put(new ReInitializeContainerEvevnt(containerId, + events.put(new ReInitializeContainerEvent(containerId, client.getNodeIdOfStartedContainer(containerId), - containerLaunchContex, autoCommit)); + containerLaunchContext, autoCommit)); } catch (InterruptedException e) { LOG.warn("Exception when scheduling the event of re-initializing of " + "Container " + containerId); @@ -508,11 +508,11 @@ public ContainerLaunchContext getContainerLaunchContext() { } } - protected static class ReInitializeContainerEvevnt extends ContainerEvent { + protected static class ReInitializeContainerEvent extends ContainerEvent { private ContainerLaunchContext containerLaunchContext; private boolean autoCommit; - public ReInitializeContainerEvevnt(ContainerId containerId, NodeId nodeId, + public ReInitializeContainerEvent(ContainerId containerId, NodeId nodeId, ContainerLaunchContext containerLaunchContext, boolean autoCommit) { super(containerId, nodeId, null, ContainerEventType.REINITIALIZE_CONTAINER); @@ -735,12 +735,12 @@ public ContainerState transition(StatefulContainer container, try { switch(containerEvent.getType()) { case REINITIALIZE_CONTAINER: - if (!(containerEvent instanceof ReInitializeContainerEvevnt)) { + if (!(containerEvent instanceof ReInitializeContainerEvent)) { LOG.error("Unexpected Event.. [" +containerEvent.getType() + "]"); return ContainerState.FAILED; } - ReInitializeContainerEvevnt rEvent = - (ReInitializeContainerEvevnt)containerEvent; + ReInitializeContainerEvent rEvent = + (ReInitializeContainerEvent)containerEvent; container.nmClientAsync.getClient().reInitializeContainer( containerId, rEvent.getContainerLaunchContext(), rEvent.isAutoCommit());