hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject [14/41] hadoop git commit: YARN-5073. Refactor startContainerInternal() in ContainerManager to remove unused parameter. (Konstantinos Karanasos via asuresh)
Date Fri, 13 May 2016 18:00:51 GMT
YARN-5073. Refactor startContainerInternal() in ContainerManager to remove unused parameter.
(Konstantinos Karanasos via asuresh)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d971bf25
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d971bf25
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d971bf25

Branch: refs/heads/HDFS-1312
Commit: d971bf252f36e902a0fe446cb11201835ad16bcb
Parents: 6e56578
Author: Arun Suresh <asuresh@apache.org>
Authored: Tue May 10 22:31:38 2016 -0700
Committer: Arun Suresh <asuresh@apache.org>
Committed: Tue May 10 22:31:38 2016 -0700

----------------------------------------------------------------------
 .../containermanager/ContainerManagerImpl.java      |  5 ++---
 .../queuing/QueuingContainerManagerImpl.java        | 16 ++++------------
 2 files changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d971bf25/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java
index 162823c..516ef90 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/ContainerManagerImpl.java
@@ -811,8 +811,7 @@ public class ContainerManagerImpl extends CompositeService implements
           }
           performContainerPreStartChecks(nmTokenIdentifier, request,
               containerTokenIdentifier);
-          startContainerInternal(nmTokenIdentifier, containerTokenIdentifier,
-              request);
+          startContainerInternal(containerTokenIdentifier, request);
           succeededContainers.add(containerId);
         } catch (YarnException e) {
           failedContainers.put(containerId, SerializedException.newInstance(e));
@@ -908,7 +907,7 @@ public class ContainerManagerImpl extends CompositeService implements
   }
 
   @SuppressWarnings("unchecked")
-  protected void startContainerInternal(NMTokenIdentifier nmTokenIdentifier,
+  protected void startContainerInternal(
       ContainerTokenIdentifier containerTokenIdentifier,
       StartContainerRequest request) throws YarnException, IOException {
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d971bf25/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/queuing/QueuingContainerManagerImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/queuing/QueuingContainerManagerImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/queuing/QueuingContainerManagerImpl.java
index ef4e571..663dd3b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/queuing/QueuingContainerManagerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/queuing/QueuingContainerManagerImpl.java
@@ -101,14 +101,14 @@ public class QueuingContainerManagerImpl extends ContainerManagerImpl
{
   }
 
   @Override
-  protected void startContainerInternal(NMTokenIdentifier nmTokenIdentifier,
+  protected void startContainerInternal(
       ContainerTokenIdentifier containerTokenIdentifier,
       StartContainerRequest request) throws YarnException, IOException {
     this.context.getQueuingContext().getQueuedContainers().put(
         containerTokenIdentifier.getContainerID(), containerTokenIdentifier);
 
     AllocatedContainerInfo allocatedContInfo = new AllocatedContainerInfo(
-        containerTokenIdentifier, nmTokenIdentifier, request,
+        containerTokenIdentifier, request,
         containerTokenIdentifier.getExecutionType(), containerTokenIdentifier
             .getResource(), getConfig());
 
@@ -189,7 +189,6 @@ public class QueuingContainerManagerImpl extends ContainerManagerImpl
{
     this.context.getQueuingContext().getQueuedContainers().remove(containerId);
     try {
       super.startContainerInternal(
-          allocatedContainerInfo.getNMTokenIdentifier(),
           allocatedContainerInfo.getContainerTokenIdentifier(),
           allocatedContainerInfo.getStartRequest());
     } catch (YarnException | IOException e) {
@@ -467,7 +466,6 @@ public class QueuingContainerManagerImpl extends ContainerManagerImpl
{
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public void handle(ApplicationEvent event) {
       if (event.getType() ==
           ApplicationEventType.APPLICATION_CONTAINER_FINISHED) {
@@ -489,16 +487,14 @@ public class QueuingContainerManagerImpl extends ContainerManagerImpl
{
 
   static class AllocatedContainerInfo {
     private final ContainerTokenIdentifier containerTokenIdentifier;
-    private final NMTokenIdentifier nmTokenIdentifier;
     private final StartContainerRequest startRequest;
     private final ExecutionType executionType;
     private final ProcessTreeInfo pti;
 
     AllocatedContainerInfo(ContainerTokenIdentifier containerTokenIdentifier,
-        NMTokenIdentifier nmTokenIdentifier, StartContainerRequest startRequest,
-        ExecutionType executionType, Resource resource, Configuration conf) {
+        StartContainerRequest startRequest, ExecutionType executionType,
+        Resource resource, Configuration conf) {
       this.containerTokenIdentifier = containerTokenIdentifier;
-      this.nmTokenIdentifier = nmTokenIdentifier;
       this.startRequest = startRequest;
       this.executionType = executionType;
       this.pti = createProcessTreeInfo(containerTokenIdentifier
@@ -509,10 +505,6 @@ public class QueuingContainerManagerImpl extends ContainerManagerImpl
{
       return this.containerTokenIdentifier;
     }
 
-    private NMTokenIdentifier getNMTokenIdentifier() {
-      return this.nmTokenIdentifier;
-    }
-
     private StartContainerRequest getStartRequest() {
       return this.startRequest;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message