[ https://issues.apache.org/jira/browse/KYLIN-4405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17053123#comment-17053123 ]
Chester Liu commented on KYLIN-4405: ------------------------------------ An alternative solution would be throwing exception when users try to build a model with null partitionDesc, which is not the case with v2.6.2. I haven't tried doing so with the latest version (v3.0.x) so I don't know what the current behaviour is. If this is now handled correctly on master, feel free to ignore this issue. > Internal exception when trying to build cube whose modal has null > PartitionDesc > -------------------------------------------------------------------------------- > > Key: KYLIN-4405 > URL: https://issues.apache.org/jira/browse/KYLIN-4405 > Project: Kylin > Issue Type: Bug > Components: Job Engine > Affects Versions: v2.6.2 > Reporter: Chester Liu > Priority: Minor > > 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. > -- This message was sent by Atlassian Jira (v8.3.4#803005)