[ 
https://issues.apache.org/jira/browse/GOBBLIN-916?focusedWorklogId=330277&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-330277
 ]

ASF GitHub Bot logged work on GOBBLIN-916:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Oct/19 04:43
            Start Date: 18/Oct/19 04:43
    Worklog Time Spent: 10m 
      Work Description: sv2000 commented on pull request #2770: [GOBBLIN-916] 
Make ContainerLaunchContext instantiation in YarnService more efficient
URL: https://github.com/apache/incubator-gobblin/pull/2770#discussion_r336316790
 
 

 ##########
 File path: gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
 ##########
 @@ -610,6 +610,9 @@ private boolean shouldStickToTheSameNode(int 
containerExitStatus) {
    */
   private void handleContainerCompletion(ContainerStatus containerStatus) {
     Map.Entry<Container, String> completedContainerEntry = 
this.containerMap.remove(containerStatus.getContainerId());
+    if(completedContainerEntry == null) {
+      LOGGER.warn(String.format("Container %s already been removed from 
containerMap before completed, there may be something wrong when starting the 
container", containerStatus.getContainerId()));
+    }
     String completedInstanceName = completedContainerEntry.getValue();
 
 Review comment:
   We may still get a NPE on line 616 if completedContainerEntry is null. I 
think the fix probably should be to not remove the instance from the 
containerMap inside NMClientCallbackHandler#onStartContainerError(), since 
handleContainerCompletion() should be called even if there is a container 
launch error. Also, the double removal is preventing a replacement container 
being launched from handleContainerCompletion() method.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 330277)
    Time Spent: 0.5h  (was: 20m)

> Make ContainerLaunchContext instantiation in YarnService more efficient
> -----------------------------------------------------------------------
>
>                 Key: GOBBLIN-916
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-916
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to