Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-1350

Result formatting is throwing NPE when the result from druid driver is empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • driver-jdbc
    • None

    Description

      Error:

      05 Oct 2016 10:55:29 [3f290017-e51d-4183-8f89-0f3045cc52dc] [ResultFormatter_AsyncThread-7] INFO  org.apache.lens.server.api.query.QueryContext - Registering driver resultset for query 3f290017-e51d-4183-8f89-0f3045cc52dc
      05 Oct 2016 10:55:29 [3f290017-e51d-4183-8f89-0f3045cc52dc] [454e896f-65b0-4c9d-b282-190f00affccf grizzly-http-server-19] INFO  org.apache.hadoop.hive.conf.HiveConf - Using the default value passed in for log id: 454e896f-65b0-4c9d-b282-190f00affccf
      05 Oct 2016 10:55:29 [3f290017-e51d-4183-8f89-0f3045cc52dc] [454e896f-65b0-4c9d-b282-190f00affccf grizzly-http-server-19] INFO  org.apache.lens.server.query.QueryExecutionServiceImpl - Updating status for 3f290017-e51d-4183-8f89-0f3045cc52dc
      05 Oct 2016 10:55:29 [3f290017-e51d-4183-8f89-0f3045cc52dc] [ResultFormatter_AsyncThread-7] ERROR org.apache.lens.driver.jdbc.JDBCResultSet - Error getting JDBC type information: null
      java.lang.NullPointerException: null
              at org.apache.lens.driver.jdbc.JDBCResultSet.getRsMetadata(JDBCResultSet.java:87) ~[lens-driver-jdbc-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.driver.jdbc.JDBCResultSet.getMetadata(JDBCResultSet.java:112) ~[lens-driver-jdbc-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.api.driver.PartiallyFetchedInMemoryResultSet.<init>(PartiallyFetchedInMemoryResultSet.java:94) [lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.api.query.QueryContext.registerDriverResult(QueryContext.java:514) [lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.api.driver.AbstractLensDriver.fetchResultSet(AbstractLensDriver.java:69) [lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.query.QueryExecutionServiceImpl.getDriverResultset(QueryExecutionServiceImpl.java:1835) [classes/:na]
              at org.apache.lens.server.query.ResultFormatter.formatOutput(ResultFormatter.java:91) [classes/:na]
              at org.apache.lens.server.query.ResultFormatter.process(ResultFormatter.java:73) [classes/:na]
              at org.apache.lens.server.query.ResultFormatter.process(ResultFormatter.java:43) [classes/:na]
              at org.apache.lens.server.api.events.AsyncEventListener$1.run(AsyncEventListener.java:110) [lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40]
              at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
      05 Oct 2016 10:55:29 [3f290017-e51d-4183-8f89-0f3045cc52dc] [ResultFormatter_AsyncThread-7] WARN  org.apache.lens.server.query.ResultFormatter - Exception while formatting result for 3f290017-e51d-4183-8f89-0f3045cc52dc
      java.lang.NullPointerException: null
              at org.apache.lens.driver.jdbc.JDBCResultSet.hasNext(JDBCResultSet.java:306) ~[lens-driver-jdbc-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.api.driver.PartiallyFetchedInMemoryResultSet.preFetchRows(PartiallyFetchedInMemoryResultSet.java:104) ~[lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.api.driver.PartiallyFetchedInMemoryResultSet.<init>(PartiallyFetchedInMemoryResultSet.java:95) ~[lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.api.query.QueryContext.registerDriverResult(QueryContext.java:514) ~[lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.api.driver.AbstractLensDriver.fetchResultSet(AbstractLensDriver.java:69) ~[lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at org.apache.lens.server.query.QueryExecutionServiceImpl.getDriverResultset(QueryExecutionServiceImpl.java:1835) ~[classes/:na]
              at org.apache.lens.server.query.ResultFormatter.formatOutput(ResultFormatter.java:91) [classes/:na]
              at org.apache.lens.server.query.ResultFormatter.process(ResultFormatter.java:73) [classes/:na]
              at org.apache.lens.server.query.ResultFormatter.process(ResultFormatter.java:43) [classes/:na]
              at org.apache.lens.server.api.events.AsyncEventListener$1.run(AsyncEventListener.java:110) [lens-server-api-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40]
              at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
      

      Attachments

        Issue Links

          Activity

            People

              rajitha.r Rajitha R
              archana.h Archana H
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: