ok, I see the query are the same in the two emails; Let's discuss in that thread, and please avoid sending the question multiple times...
ShaoFeng Shi <[email protected]> 于2018年10月13日周六 下午10:47写道: > Hi Yafei, > > It looks like the problem is related with "prepared statement", am I > correct? > > There is another reporting, please check the email "【kylin2.5.0】 > NullPointerException". The error log seems to be incomplete, can you > provide more logs before and after it? Thank you. > > [email protected] <[email protected]> 于2018年10月12日周五 下午3:23写道: > >> Hi Friends: >> >> Recently, our team encountered some problems with Kylin, >> described as follows (all of the following tests were done with Postman >> sending Restful requests): >> >> 1. CDH version 6.0, Kylin version 2.5 >> >> 2. When the deployment is completed, there will be errors in >> complex connection queries and replacement parameters. >> >> *The query request is as follows*: >> { >> "sql": "SELECT loan.create_time AS time_date, >> loan.apply_orders AS apply_orders, lend.loan_orders AS loan_orders, >> round( cast(applyLend.apply_and_loan_orders AS DOUBLE) / >> loan.apply_orders,4 ) AS loan_pass_rate FROM ( >> SELECT create_time, count(borrow_id) AS apply_orders >> FROM APP_BI_ORDER_APPLY WHERE create_time=? GROUP >> BY create_time ) loan LEFT JOIN ( SELECT >> LOAN_TIME, count(borrow_id) AS loan_orders FROM >> APP_BI_ORDER_APPLY WHERE LOAN_TIME=? GROUP BY >> LOAN_TIME ) lend ON lend.LOAN_TIME = loan.create_time LEFT >> JOIN ( SELECT LOAN_TIME, count(borrow_id) AS >> apply_and_loan_orders FROM APP_BI_ORDER_APPLY WHERE >> LOAN_TIME=? AND create_time=? GROUP BY LOAN_TIME ) >> applyLend ON applyLend.LOAN_TIME = loan.create_time", >> "project": "BI", >> "acceptPartial": false, >> "backdoorToggles": { >> "ATTR_STATEMENT_MAX_ROWS": "0" >> }, >> "params": [{ >> "className": "java.lang.String", >> "value": "2018-06-01" >> }, { >> "className": "java.lang.String", >> "value": "2018-06-01" >> }, { >> "className": "java.lang.String", >> "value": "2018-06-01" >> }, { >> "className": "java.lang.String", >> "value": "2018-06-01" >> }] >> } >> >> *The error message is returned below:* >> { >> "code": "999", >> "data": null, >> "msg": "Unknown error.", >> "stacktrace": "org.apache.kylin.rest.exception.InternalErrorException: >> Unknown error.\n\tat >> org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:424)\n\tat >> org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:351)\n\tat >> org.apache.kylin.rest.controller.QueryController.query(QueryController.java:86)\n\tat >> sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)\n\tat >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat >> java.lang.reflect.Method.invoke(Method.java:498)\n\tat >> org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n\tat >> org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)\n\tat >> org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)\n\tat >> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)\n\tat >> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)\n\tat >> org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)\n\tat >> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)\n\tat >> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)\n\tat >> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)\n\tat >> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)\n\tat >> javax.servlet.http.HttpServlet.service(HttpServlet.java:661)\n\tat >> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)\n\tat >> javax.servlet.http.HttpServlet.service(HttpServlet.java:742)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat >> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)\n\tat >> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\n\tat >> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)\n\tat >> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)\n\tat >> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\n\tat >> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\n\tat >> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\n\tat >> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)\n\tat >> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)\n\tat >> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat >> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat >> com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209)\n\tat >> com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)\n\tat >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\n\tat >> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)\n\tat >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)\n\tat >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)\n\tat >> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)\n\tat >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)\n\tat >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)\n\tat >> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)\n\tat >> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\n\tat >> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)\n\tat >> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)\n\tat >> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n\tat >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat >> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tat >> java.lang.Thread.run(Thread.java:748)\n", >> "exception": "Unknown error.", >> "url": "http://47.93.101.150:7070/kylin/api/query" >> } >> >> 3. Errorsdo not exist when complex connection queries do not >> have replacement parameters, such as: >> >> { >> "sql": "SELECT loan.create_time AS time_date, >> loan.apply_orders AS apply_orders, lend.loan_orders AS loan_orders, >> round( cast(applyLend.apply_and_loan_orders AS DOUBLE) / >> loan.apply_orders,4 ) AS loan_pass_rate FROM ( >> SELECT create_time, count(borrow_id) AS apply_orders >> FROM APP_BI_ORDER_APPLY WHERE create_time='2018-01-01' >> GROUP BY create_time ) loan LEFT JOIN ( >> SELECT LOAN_TIME, count(borrow_id) AS loan_orders >> FROM APP_BI_ORDER_APPLY WHERE LOAN_TIME='2018-01-01' >> GROUP BY LOAN_TIME ) lend ON lend.LOAN_TIME = >> loan.create_time LEFT JOIN ( SELECT LOAN_TIME, >> count(borrow_id) AS apply_and_loan_orders FROM >> APP_BI_ORDER_APPLY WHERE LOAN_TIME='2018-01-01' AND >> create_time='2018-01-01' GROUP BY LOAN_TIME ) >> applyLend ON applyLend.LOAN_TIME = loan.create_time", >> "project": "BI", >> "acceptPartial": false, >> "backdoorToggles": { >> "ATTR_STATEMENT_MAX_ROWS": "0" >> }, >> "params": [] >> } >> >> 4. Simple queries and subqueries have no problem no matter whether >> there are replacement parameters, such as: >> >> { >> "sql":"select user_id, borrow_id, pass_time from app_bi_order_apply", >> "project":"BI", >> "acceptPartial":true, >> "backdoorToggles":{ >> "ATTR_STATEMENT_MAX_ROWS":"0" >> }, >> "params":[ >> >> ] >> } >> >> >> *The above is a detailed description of the problem. I would appreciate >> it if you could help me to sort out the problem or provide some solutions!* >> >> *Best Regards!* >> >> >> >> ------------------------------ >> YaFei Wang >> > > > -- > Best regards, > > Shaofeng Shi 史少锋 > > -- Best regards, Shaofeng Shi 史少锋
