You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/03/10 08:50:51 UTC
[48/50] [abbrv] kylin git commit: KYLIN-1464 prevent
NullPointerException when CubeDesc init failed due to IllegalStateException
KYLIN-1464 prevent NullPointerException when CubeDesc init failed due to IllegalStateException
Signed-off-by: Hongbin Ma <ma...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ed57c3b3
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ed57c3b3
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ed57c3b3
Branch: refs/heads/master
Commit: ed57c3b30c8680c2bcb73b6d8b889d05b952d596
Parents: 26233f7
Author: John Zhao <yu...@ebay.com>
Authored: Wed Mar 2 14:51:58 2016 -0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Thu Mar 10 09:27:10 2016 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/kylin/cube/CubeInstance.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/ed57c3b3/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
index 2862d4f..d89e736 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
@@ -125,7 +125,12 @@ public class CubeInstance extends RootPersistentEntity implements IRealization,
@Override
public DataModelDesc getDataModelDesc() {
- return this.getDescriptor().getModel();
+ CubeDesc cubeDesc = this.getDescriptor();
+ if (cubeDesc != null) {
+ return cubeDesc.getModel();
+ } else {
+ return null;
+ }
}
public boolean isReady() {