Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
v1.0
-
None
-
None
-
Patch
Description
I create a cube with a fact table and a lookup table .
When modify the cube delete the lookup table leave the fact table and the fact table dimensions.The updateCubeAndDesc function throw exception:
[http-bio-7070-exec-7]:[2015-09-10 17:10:55,357][ERROR][org.apache.kylin.cube.CubeDescManager.reloadAllCubeDesc(CubeDescManager.java:202)] - Error loading cube desc /cube_desc/test.json java.lang.IllegalStateException: Derived can only be defined on lookup table, cube CubeDesc [name=test], DimensionDesc [name=DEFAULT.KYLIN_SALES_DERIVED, join=null, hierarchy=null, table=DEFAULT.KYLIN_SALES, column=null, derived=[LSTG_FORMAT_NAME]] at org.apache.kylin.cube.model.DimensionDesc.init(DimensionDesc.java:113) at org.apache.kylin.cube.model.CubeDesc.init(CubeDesc.java:446) at org.apache.kylin.cube.CubeDescManager.loadCubeDesc(CubeDescManager.java:129) at org.apache.kylin.cube.CubeDescManager.reloadAllCubeDesc(CubeDescManager.java:200) at org.apache.kylin.cube.CubeDescManager.<init>(CubeDescManager.java:93) at org.apache.kylin.cube.CubeDescManager.getInstance(CubeDescManager.java:73) at org.apache.kylin.cube.CubeInstance.getDescriptor(CubeInstance.java:121) at org.apache.kylin.rest.service.CubeService.updateCubeAndDesc(CubeService.java:238) at org.apache.kylin.rest.service.CubeService$$FastClassByCGLIB$$17a07c0e.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) at org.apache.kylin.rest.service.CubeService$$EnhancerByCGLIB$$99dab573.updateCubeAndDesc(<generated>) at org.apache.kylin.rest.controller.CubeController.updateCubeDesc(CubeController.java:401)
The reason is when update the CubeDesc,first update the DataModel and trigger clean cache.the DataModel is new doesn't contains lookup tables,
then update the CubeDesc.
Before update CubeDesc, all the CubeDesc's cache in CubeDescManager will reload and the test cube's DimensionDesc check the attribute "join" and "derived" is not match.
I try to delete the check and add the attribute "join" null check.It works!
Please review the patch and discuss the issue and patch.
Attachments
Attachments
Issue Links
- duplicates
-
KYLIN-958 update cube data model may fail and leave metadata in inconsistent state
- Closed