[ 
https://issues.apache.org/jira/browse/KYLIN-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andras Istvan Nagy updated KYLIN-4191:
--------------------------------------
    Description: 
I am using the real-time olap feature with a lambda datasource definition. When 
executing a query that has a count(dim_field) in the select clause, where 
"dim_field" is one of the dimension fields, I get a NPE from 
org.apache.kylin.stream.core.query.StreamingTupleConverter.

(According to a colleague, a similar query used to work for some time in our 
environment, and then stopped working, but I can't verify this statement. 
Restarting the Kylin processes or disabling/enabling the cube does not "fix" 
the issue.)

Please see stacktrace below.

 

 

  was:
I am using the real-time olap feature with a lambda datasource definition. When 
executing a query that has a count(dim_field) in the select clause, where 
"dim_field" is one of the dimension fields, I get a NPE from 
org.apache.kylin.stream.core.query.StreamingTupleConverter.

(According to a colleague, a similar query used to work for some time in our 
environment, and then stopped working, but I can't verify this statement. 
Restarting the Kylin processes or disabling/enabling the cube does not "fix" 
the issue.)

Please see stacktrace below.
{noformat}
08:02:19.151 [pool-15-thread-304] ERROR 
org.apache.kylin.storage.hbase.cube.v2.CubeHBaseEndpointRPC - <sub-thread for 
Query c99e9521-051a-a62f-0b57-f92b036b80d6 GTScanRequest 202ef05b>Error when 
visiting cubes by endpoint08:02:19.151 [pool-15-thread-304] ERROR 
org.apache.kylin.storage.hbase.cube.v2.CubeHBaseEndpointRPC - <sub-thread for 
Query c99e9521-051a-a62f-0b57-f92b036b80d6 GTScanRequest 202ef05b>Error when 
visiting cubes by endpointjava.sql.SQLException: Error while executing SQL 
"select * from (SELECT count(intersection_id) FROM 
OBJECT_MOVEMENT_EVENTS_OLAP_VIEW) limit 50000": null at 
org.apache.calcite.avatica.Helper.createException(Helper.java:56) 
~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.avatica.Helper.createException(Helper.java:41) 
~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:163)
 ~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:227)
 ~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.rest.service.QueryService.executeRequest(QueryService.java:969)
 ~[kylin-server-base-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:672)
 ~[kylin-server-base-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.rest.service.QueryService.query(QueryService.java:218) 
~[kylin-server-base-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:479)
 ~[kylin-server-base-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:439)
 ~[kylin-server-base-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:377)
 ~[kylin-server-base-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93) 
~[kylin-server-base-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source) ~[?:?] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) 
~[?:1.8.0_222] at 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:650) 
~[servlet-api.jar:?] at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:731) 
~[servlet-api.jar:?] at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 ~[catalina.jar:7.0.91] at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
~[tomcat7-websocket.jar:7.0.91] at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 ~[catalina.jar:7.0.91] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 ~[spring-web-4.3.10.RELEASE.jar:4.3.10.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 ~[spring-web-4.3.10.RELEASE.jar:4.3.10.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 ~[spring-web-4.3.10.RELEASE.jar:4.3.10.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
 ~[spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
 ~[kylin-job-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 ~[catalina.jar:7.0.91] at 
com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209) 
~[cors-filter-2.5.jar:2.5] at 
com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244) 
~[cors-filter-2.5.jar:2.5] at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) 
~[catalina.jar:7.0.91] at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
~[catalina.jar:7.0.91] at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025) 
~[catalina.jar:7.0.91] at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
 ~[catalina.jar:7.0.91] at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) 
~[catalina.jar:7.0.91] at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
 ~[tomcat-coyote.jar:7.0.91] at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
 ~[tomcat-coyote.jar:7.0.91] at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
 ~[tomcat-coyote.jar:7.0.91] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_222] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_222] at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 ~[tomcat-coyote.jar:7.0.91] at java.lang.Thread.run(Thread.java:748) 
[?:1.8.0_222]
Caused by: java.lang.NullPointerException at 
org.apache.kylin.stream.core.query.StreamingTupleConverter.<init>(StreamingTupleConverter.java:86)
 ~[kylin-stream-core-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.storage.stream.rpc.HttpStreamDataSearchClient.search(HttpStreamDataSearchClient.java:104)
 ~[kylin-storage-stream-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.storage.stream.StreamStorageQuery.search(StreamStorageQuery.java:114)
 ~[kylin-storage-stream-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.query.enumerator.OLAPEnumerator.queryStorage(OLAPEnumerator.java:114)
 ~[kylin-query-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at 
org.apache.kylin.query.enumerator.OLAPEnumerator.moveNext(OLAPEnumerator.java:60)
 ~[kylin-query-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] at Baz$1$1.moveNext(Unknown 
Source) ~[?:?] at 
org.apache.calcite.linq4j.EnumerableDefaults.aggregate(EnumerableDefaults.java:116)
 ~[calcite-linq4j-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.linq4j.DefaultEnumerable.aggregate(DefaultEnumerable.java:107)
 ~[calcite-linq4j-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at Baz.bind(Unknown 
Source) ~[?:?] at 
org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:365)
 ~[calcite-core-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:301)
 ~[calcite-core-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:559)
 ~[calcite-core-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:550)
 ~[calcite-core-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:182) 
~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:67) 
~[calcite-core-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:44) 
~[calcite-core-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:667)
 ~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:619)
 ~[calcite-core-1.16.0-kylin-r2.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:675)
 ~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156)
 ~[avatica-1.12.0.jar:3.0.0-SNAPSHOT] ... 83 more{noformat}


> NPE in StreamingTupleConverter when querying count on a dimension field
> -----------------------------------------------------------------------
>
>                 Key: KYLIN-4191
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4191
>             Project: Kylin
>          Issue Type: Bug
>          Components: Real-time Streaming
>    Affects Versions: v3.0.0-alpha
>            Reporter: Andras Istvan Nagy
>            Priority: Major
>
> I am using the real-time olap feature with a lambda datasource definition. 
> When executing a query that has a count(dim_field) in the select clause, 
> where "dim_field" is one of the dimension fields, I get a NPE from 
> org.apache.kylin.stream.core.query.StreamingTupleConverter.
> (According to a colleague, a similar query used to work for some time in our 
> environment, and then stopped working, but I can't verify this statement. 
> Restarting the Kylin processes or disabling/enabling the cube does not "fix" 
> the issue.)
> Please see stacktrace below.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to