You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "Xiaoyu Wang (JIRA)" <ji...@apache.org> on 2015/09/10 11:31:46 UTC

[jira] [Created] (KYLIN-1022) Error in CubeDesc update when delete lookup table

Xiaoyu Wang created KYLIN-1022:
----------------------------------

             Summary: Error in CubeDesc update when delete lookup table
                 Key: KYLIN-1022
                 URL: https://issues.apache.org/jira/browse/KYLIN-1022
             Project: Kylin
          Issue Type: Bug
          Components: Metadata
    Affects Versions: v1.0
            Reporter: Xiaoyu Wang
            Assignee: Shaofeng SHI


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:
{noformat}
[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)
{noformat}

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)