標籤:sch eth name with get tin 一個 logs cab
報錯資訊:
2017-06-26 20:06:58,925 ERROR [Query 12e9c054-760c-4615-9699-b1f06724c9b6-328] service.QueryService:372 : Exception when execute sqljava.lang.NullPointerException at org.apache.kylin.metadata.project.ProjectL2Cache.loadCache(ProjectL2Cache.java:193) at org.apache.kylin.metadata.project.ProjectL2Cache.getCache(ProjectL2Cache.java:167) at org.apache.kylin.metadata.project.ProjectL2Cache.listExposedTables(ProjectL2Cache.java:84) at org.apache.kylin.metadata.project.ProjectManager.listExposedTables(ProjectManager.java:409) at org.apache.kylin.query.schema.OLAPSchemaFactory.createTempOLAPJson(OLAPSchemaFactory.java:83) at org.apache.kylin.rest.service.CacheService.getOLAPDataSource(CacheService.java:159) at org.apache.kylin.rest.service.QueryService.execute(QueryService.java:526) at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:452) at org.apache.kylin.rest.service.QueryService.query(QueryService.java:151) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:354) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
==========================[QUERY]===============================Query Id: 12e9c054-760c-4615-9699-b1f06724c9b6SQL: select VISIT_TYPE, count(*) from xxdb.xxtable group by VISIT_TYPELIMIT 50000User: ADMINSuccess: trueDuration: 0.0Project: energon_dmRealization Names: []Cuboid Ids: []Total scan count: 0Result row count: 0Accept Partial: trueIs Partial Result: falseHit Exception Cache: falseStorage cache used: falseMessage: null==========================[QUERY]===============================2017-06-26 20:06:58,926 ERROR [http-bio-7070-exec-6] controller.BasicController:44 : org.apache.kylin.rest.exception.InternalErrorException at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:389) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853)
解決過程:
根據報錯資訊排查源碼:
193行pi不為空白,那就只能是pi.getExtFilters()為空白,查看對應的meta資料,此欄位果然為null。正常情況下此欄位沒值時應該是個空數組,改為空白數組後解決。原來異常meta是使用者自己產生通過背景程式傳入kylin的。
ps: 上面代碼位於類org.apache.kylin.metadata.project.ProjectL2Cache中,這個類對應的就是Meta中的一個project:
解決kylin查詢報錯:org.apache.kylin.rest.exception.InternalErrorException