Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
v2.6.2
-
None
Description
We are using 2.6.2 in our production environment and came upon this exception. We build our model and cube using the REST api, which allows null partitionDesc in a kylin model. However, when we try to build the cube related to the model, this exception occurs:
org.apache.kylin.rest.exception.InternalErrorException
org.apache.kylin.rest.controller.CubeController.buildInternal(CubeController.java:398)org.apache.kylin.rest.controller.CubeController.rebuild(CubeController.java:354)
org.apache.kylin.rest.controller.CubeController.build(CubeController.java:343)
sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
...
Caused by: java.lang.NullPointerException
org.apache.kylin.cube.CubeManager$SegmentAssist.appendSegment(CubeManager.java:695)
org.apache.kylin.cube.CubeManager.appendSegment(CubeManager.java:638)
org.apache.kylin.cube.CubeManager.appendSegment(CubeManager.java:630)
org.apache.kylin.rest.service.JobService.submitJobInternal(JobService.java:233)
org.apache.kylin.rest.service.JobService.submitJob(JobService.java:202)
org.apache.kylin.rest.controller.CubeController.buildInternal(CubeController.java:394)
Our current solution is using a not-null partitionDesc with empty partitionDateColumn. But I think ultimately a null partitionDesc makes more sense to me when our data source is not partitioned in the first place.
I searched the codebase for null-checking of partitionDesc and found several of them. So I think an extra null-check should be added.