Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-1022

Error in CubeDesc update when delete lookup table

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • v1.0
    • None
    • Metadata
    • 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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shaofengshi Shao Feng Shi
            wangxiaoyu Xiaoyu Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment