You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/03/05 22:52:32 UTC

[GitHub] [incubator-gobblin] sv2000 commented on a change in pull request #2908: [GOBBLIN-1069] Add NPE check in handleContainerCompletion method

sv2000 commented on a change in pull request #2908: [GOBBLIN-1069] Add NPE check in handleContainerCompletion method
URL: https://github.com/apache/incubator-gobblin/pull/2908#discussion_r388613538
 
 

 ##########
 File path: gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
 ##########
 @@ -620,7 +620,10 @@ private boolean shouldStickToTheSameNode(int containerExitStatus) {
    */
   protected void handleContainerCompletion(ContainerStatus containerStatus) {
     Map.Entry<Container, String> completedContainerEntry = this.containerMap.remove(containerStatus.getContainerId());
-
+    if (completedContainerEntry == null) {
 
 Review comment:
   @ZihanLi58 shouldn't we get a replacement container for this? The problem we are hitting NPE is that container allocation/completion are asynchronous calls and there is no guarantee that the callbacks are processed in the same order. In other words, handleContainerCompletion() callback may happen before onContainersAllocated(), which can cause NPE. In this scenario, we should be requesting a replacement container. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services