Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6013

requesting INFORMATION_SCHEMA with a postgresql connector generates a null pointer exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 1.11.0
    • 1.16.0
    • None
    • None
    • debian 8, postgresql 8.6

    Description

      This select from https://drill.apache.org/docs/querying-the-information-schema/ works great with other sources (cp, dfs), but generates an error with postgresql:

      SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
      FROM INFORMATION_SCHEMA.`TABLES`
      ORDER BY TABLE_NAME DESC;
      

      The error is:

      Query Failed: An Error Occurred
      org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: NullPointerException: Error. Type information for table pg.information_schema._pg_foreign_data_wrappers provided is null. Fragment 0:0 [Error Id: c6f8bac2-f74f-4018-bbea-86ded61a432f on worker1:31010]
      

      I got this error message in drillbit.log:

      2017-12-06 06:56:11,317 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:foreman] INFO  o.a.drill.exec.work.foreman.Foreman - Query text for query id 25d86b73-f65b-af3f-7dc4-895c0dfda68a: SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
      FROM INFORMATION_SCHEMA.`TABLES`
      ORDER BY TABLE_NAME DESC
      2017-12-06 06:56:11,335 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:foreman] INFO  o.a.d.c.s.persistence.ScanResult - loading 7 classes for org.apache.drill.exec.store.dfs.FormatPlugin took 0ms
      2017-12-06 06:56:11,336 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:foreman] INFO  o.a.d.c.s.persistence.ScanResult - loading 8 classes for org.apache.drill.common.logical.FormatPluginConfig took 0ms
      2017-12-06 06:56:11,336 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:foreman] INFO  o.a.d.c.s.persistence.ScanResult - loading 8 classes for org.apache.drill.common.logical.FormatPluginConfig took 0ms
      2017-12-06 06:56:11,336 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:foreman] INFO  o.a.d.c.s.persistence.ScanResult - loading 8 classes for org.apache.drill.common.logical.FormatPluginConfig took 0ms
      2017-12-06 06:56:11,399 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:frag:0:0] INFO  o.a.d.c.s.persistence.ScanResult - loading 7 classes for org.apache.drill.exec.store.dfs.FormatPlugin took 0ms
      2017-12-06 06:56:11,400 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:frag:0:0] INFO  o.a.d.c.s.persistence.ScanResult - loading 8 classes for org.apache.drill.common.logical.FormatPluginConfig took 0ms
      2017-12-06 06:56:11,401 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:frag:0:0] INFO  o.a.d.c.s.persistence.ScanResult - loading 8 classes for org.apache.drill.common.logical.FormatPluginConfig took 0ms
      2017-12-06 06:56:11,401 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:frag:0:0] INFO  o.a.d.c.s.persistence.ScanResult - loading 8 classes for org.apache.drill.common.logical.FormatPluginConfig took 0ms
      2017-12-06 06:56:11,422 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:frag:0:0] INFO  o.a.d.e.w.fragment.FragmentExecutor - 25d86b73-f65b-af3f-7dc4-895c0dfda68a:0:0: State change requested AWAITING_ALLOCATION --> FAILED
      2017-12-06 06:56:11,422 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:frag:0:0] INFO  o.a.d.e.w.fragment.FragmentExecutor - 25d86b73-f65b-af3f-7dc4-895c0dfda68a:0:0: State change requested FAILED --> FINISHED
      2017-12-06 06:56:11,423 [25d86b73-f65b-af3f-7dc4-895c0dfda68a:frag:0:0] ERROR o.a.d.e.w.fragment.FragmentExecutor - SYSTEM ERROR: NullPointerException: Error. Type information for table pg.information_schema._pg_foreign_data_wrappers provided is null.
      
      Fragment 0:0
      
      [Error Id: c6f8bac2-f74f-4018-bbea-86ded61a432f on worker1:31010]
      org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: NullPointerException: Error. Type information for table pg.information_schema._pg_foreign_data_wrappers provided is null.
      
      Fragment 0:0
      
      [Error Id: c6f8bac2-f74f-4018-bbea-86ded61a432f on worker1:31010]
      	at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:550) ~[drill-common-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:295) [drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:160) [drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:264) [drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-1.11.0.jar:1.11.0]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
      	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
      Caused by: java.lang.NullPointerException: Error. Type information for table pg.information_schema._pg_foreign_data_wrappers provided is null.
      	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250) ~[guava-18.0.jar:na]
      	at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator$Tables.visitTableWithType(InfoSchemaRecordGenerator.java:314) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator$Tables.visitTables(InfoSchemaRecordGenerator.java:308) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:215) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:208) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:208) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:195) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaTableType.getRecordReader(InfoSchemaTableType.java:58) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:36) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:30) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:156) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:179) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:136) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:179) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:136) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:179) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:136) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:179) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:136) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:179) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getRootExec(ImplCreator.java:109) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.physical.impl.ImplCreator.getExec(ImplCreator.java:87) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:207) [drill-java-exec-1.11.0.jar:1.11.0]
      	... 4 common frames omitted
      2017-12-06 06:56:11,429 [qtp966446307-165] ERROR o.a.d.e.server.rest.QueryResources - Query from Web UI Failed
      org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: NullPointerException: Error. Type information for table pg.information_schema._pg_foreign_data_wrappers provided is null.
      
      Fragment 0:0
      
      [Error Id: c6f8bac2-f74f-4018-bbea-86ded61a432f on worker1:31010]
      	at org.apache.drill.exec.rpc.AbstractDisposableUserClientConnection.sendResult(AbstractDisposableUserClientConnection.java:85) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:868) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:977) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.Foreman.access$2600(Foreman.java:115) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:1027) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:1020) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.common.EventProcessor.processEvents(EventProcessor.java:107) ~[drill-common-1.11.0.jar:1.11.0]
      	at org.apache.drill.common.EventProcessor.sendEvent(EventProcessor.java:65) ~[drill-common-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.addEvent(Foreman.java:1022) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.Foreman.addToEventQueue(Foreman.java:1040) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.foreman.QueryManager$1.statusUpdate(QueryManager.java:521) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.rpc.control.WorkEventBus.statusUpdate(WorkEventBus.java:71) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.batch.ControlMessageHandler.handle(ControlMessageHandler.java:94) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.work.batch.ControlMessageHandler.handle(ControlMessageHandler.java:55) ~[drill-java-exec-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.rpc.BasicServer.handle(BasicServer.java:157) ~[drill-rpc-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.rpc.BasicServer.handle(BasicServer.java:53) ~[drill-rpc-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:274) ~[drill-rpc-1.11.0.jar:1.11.0]
      	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:244) ~[drill-rpc-1.11.0.jar:1.11.0]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[netty-codec-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150) ~[netty-handler-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242) ~[netty-codec-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) ~[netty-transport-4.0.27.Final.jar:4.0.27.Final]
      	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111) ~[netty-common-4.0.27.Final.jar:4.0.27.Final]
      	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]
      2017-12-06 06:56:11,437 [BitServer-4] WARN  o.a.drill.exec.work.foreman.Foreman - Dropping request to move to COMPLETED state as query is already at FAILED state (which is terminal).
      2017-12-06 06:56:11,440 [BitServer-4] WARN  o.a.d.e.w.b.ControlMessageHandler - Dropping request to cancel fragment. 25d86b73-f65b-af3f-7dc4-895c0dfda68a:0:0 does not exist.
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              glehmann Gaƫtan Lehmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: