You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by le...@apache.org on 2020/03/05 20:08:32 UTC
[incubator-gobblin] branch master updated: [GOBBLIN-1069] Add NPE
check in handleContainerCompletion method
This is an automated email from the ASF dual-hosted git repository.
lesun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new 64f9339 [GOBBLIN-1069] Add NPE check in handleContainerCompletion method
64f9339 is described below
commit 64f9339027e4cbaec320ae7849a4f47e2d71e1c9
Author: Zihan Li <zi...@zihli-mn1.linkedin.biz>
AuthorDate: Thu Mar 5 12:08:23 2020 -0800
[GOBBLIN-1069] Add NPE check in handleContainerCompletion method
add writer schema to workUnitState
directly use writer.latest.schema
Add NPE check in handleContainerCompletion method
change code style
Closes #2908 from ZihanLi58/GOBBLIN-1069
---
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java b/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
index d10d3ac..ff1f3ba 100644
--- a/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
+++ b/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java
@@ -620,7 +620,10 @@ public class YarnService extends AbstractIdleService {
*/
protected void handleContainerCompletion(ContainerStatus containerStatus) {
Map.Entry<Container, String> completedContainerEntry = this.containerMap.remove(containerStatus.getContainerId());
-
+ if (completedContainerEntry == null) {
+ //No map for this container means we don't maintain this container, directly return
+ return;
+ }
String completedInstanceName = completedContainerEntry.getValue();
LOGGER.info(String.format("Container %s running Helix instance %s has completed with exit status %d",