You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by nj...@apache.org on 2017/12/02 17:24:02 UTC

[09/19] kylin git commit: APACHE-KYLIN-2707: fix NPE

APACHE-KYLIN-2707: fix NPE

Signed-off-by: Zhong <nj...@apache.org>


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

Branch: refs/heads/master
Commit: 4e8e2f755c28e746acbbfa9cd6cfa3e53d3593ee
Parents: 35774a1
Author: Wang Ken <mi...@ebay.com>
Authored: Mon Nov 13 20:55:33 2017 +0800
Committer: Zhong <nj...@apache.org>
Committed: Sat Dec 2 23:21:44 2017 +0800

----------------------------------------------------------------------
 .../apache/kylin/engine/mr/common/JobInfoConverter.java   | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/4e8e2f75/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/JobInfoConverter.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/JobInfoConverter.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/JobInfoConverter.java
index 3098c15..a230517 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/JobInfoConverter.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/JobInfoConverter.java
@@ -62,6 +62,11 @@ public class JobInfoConverter {
         }
 
         Output output = outputs.get(job.getId());
+        if (output == null) {
+            logger.warn("job output is null.");
+            return null;
+        }
+
         final JobInstance result = new JobInstance();
         result.setName(job.getName());
         result.setRelatedCube(CubingExecutableUtil.getCubeName(job.getParams()));
@@ -91,6 +96,11 @@ public class JobInfoConverter {
         }
 
         Output output = outputs.get(job.getId());
+        if (output == null) {
+            logger.warn("job output is null.");
+            return null;
+        }
+
         final JobInstance result = new JobInstance();
         result.setName(job.getName());
         result.setRelatedCube(CubingExecutableUtil.getCubeName(job.getParams()));