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 2016/04/18 08:35:28 UTC
[46/50] 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/1fed301d
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/1fed301d
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/1fed301d
Branch: refs/heads/1.4-rc
Commit: 1fed301dbdf484ac95ab058d123f118fe32afb0a
Parents: 278893c
Author: John Zhao <yu...@ebay.com>
Authored: Wed Mar 2 14:51:58 2016 -0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Tue Mar 8 15:35:54 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/1fed301d/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 6139a2e..0d32f9f 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() {