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/04 21:27:18 UTC

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

ZihanLi58 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_r387944305
 
 

 ##########
 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:
   We have met some NPE when the container completion happens. And we alway add the containerId to the map when one container is allocated and remove the id only inside this method. So we assume that there may be chances that for one completed container, this method will be called more than once. And in that scenario (the method has already be called once to handle this completion), we can say we no longer maintain this 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