从Apache Drill使用DB2时出错

时间:2018-04-07 18:00:44

标签: db2 db2-luw apache-drill

想知道是否有人设法让DB2(LUW)使用Apache Drill(v1.13.0)。

旧司机抛出异常(见下面的评论)

Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][10120][10898][4.15.82]
    Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
    at com.ibm.db2.jcc.am.fd.a(fd.java:680) ~[db2jcc4.jar:na]
    at com.ibm.db2.jcc.am.fd.a(fd.java:60) ~[db2jcc4.jar:na]
    at com.ibm.db2.jcc.am.fd.a(fd.java:103) ~[db2jcc4.jar:na]
    at com.ibm.db2.jcc.am.ResultSet.checkForClosedResultSet(ResultSet.java:4599) ~[db2jcc4.jar:na]
    at com.ibm.db2.jcc.am.ResultSet.nextX(ResultSet.java:330) ~[db2jcc4.jar:na]

最新的jdbc驱动程序(4.21.29)

使用例如查询SELECT'test'FROM db2.SYSIBM.SYSDUMMY1 给出错误:

org.apache.drill.common.exceptions.UserRemoteException:VALIDATION ERROR:null SQL Query null [错误ID:16121ad3-919b-44cb-b343-b71ec56314f7 on 10.21.238.244:31010]

配置:

{
  "type": "jdbc",
  "driver": "com.ibm.db2.jcc.DB2Driver",
  "url": "jdbc:db2://host:50000/TESTDB",
  "username": "db2inst1",
  "password": "XXXXXXX",
  "enabled": true
}

完整的堆栈跟踪在这里:

2018-04-14 14:27:08,744 [252e1a73-4a10-5b33-00fa-6109db8680e2:foreman] INFO  o.a.drill.exec.work.foreman.Foreman - Query text for query id 252e1a73-4a10-5b33-00fa-6109db8680e2: SELECT 'test' FROM db2.SYSIBM.SYSDUMMY1
2018-04-14 14:27:08,769 [252e1a73-4a10-5b33-00fa-6109db8680e2:foreman] INFO  o.a.d.exec.planner.sql.SqlConverter - User Error Occurred (null)
org.apache.drill.common.exceptions.UserException: VALIDATION ERROR: null

SQL Query null

[Error Id: 16121ad3-919b-44cb-b343-b71ec56314f7 ]
    at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:633) ~[drill-common-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.planner.sql.SqlConverter.validate(SqlConverter.java:199) [drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode(DefaultSqlHandler.java:630) [drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert(DefaultSqlHandler.java:202) [drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:174) [drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan(DrillSqlWorker.java:146) [drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:84) [drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:567) [drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:264) [drill-java-exec-1.13.0.jar:1.13.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_144]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_144]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]
Caused by: java.lang.NullPointerException: null
    at org.apache.calcite.util.NameSet$1.compare(NameSet.java:40) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.util.NameSet$1.compare(NameSet.java:38) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at java.util.TreeMap.compare(TreeMap.java:1295) ~[na:1.8.0_144]
    at java.util.TreeMap.put(TreeMap.java:538) ~[na:1.8.0_144]
    at org.apache.calcite.util.NameMap.put(NameMap.java:54) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.jdbc.SimpleCalciteSchema.add(SimpleCalciteSchema.java:65) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.jdbc.CalciteSchema$SchemaPlusImpl.add(CalciteSchema.java:609) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.drill.exec.store.jdbc.JdbcStoragePlugin$JdbcCatalogSchema.setHolder(JdbcStoragePlugin.java:346) ~[drill-jdbc-storage-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.store.jdbc.JdbcStoragePlugin.registerSchemas(JdbcStoragePlugin.java:434) ~[drill-jdbc-storage-1.13.0.jar:1.13.0]
    at org.apache.calcite.jdbc.DynamicRootSchema.loadSchemaFactory(DynamicRootSchema.java:81) ~[drill-java-exec-1.13.0.jar:1.15.0-drill-r0]
    at org.apache.calcite.jdbc.DynamicRootSchema.getImplicitSubSchema(DynamicRootSchema.java:66) ~[drill-java-exec-1.13.0.jar:1.15.0-drill-r0]
    at org.apache.calcite.jdbc.CalciteSchema.getSubSchema(CalciteSchema.java:233) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.SqlValidatorUtil.getSchema(SqlValidatorUtil.java:992) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.SqlValidatorUtil.getTableEntry(SqlValidatorUtil.java:953) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.prepare.CalciteCatalogReader.getTable(CalciteCatalogReader.java:117) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.drill.exec.planner.sql.SqlConverter$DrillCalciteCatalogReader.getTable(SqlConverter.java:633) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.planner.sql.SqlConverter$DrillValidator.validateFrom(SqlConverter.java:261) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3216) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:947) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:928) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:226) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:903) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:613) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
    at org.apache.drill.exec.planner.sql.SqlConverter.validate(SqlConverter.java:190) [drill-java-exec-1.13.0.jar:1.13.0]
    ... 10 common frames omitted
2018-04-14 14:27:08,776 [qtp2102527385-110] ERROR o.a.d.e.server.rest.QueryResources - Query from Web UI Failed
org.apache.drill.common.exceptions.UserRemoteException: VALIDATION ERROR: null

SQL Query null

[Error Id: 16121ad3-919b-44cb-b343-b71ec56314f7 on 10.21.238.244:31010]
    at org.apache.drill.exec.rpc.AbstractDisposableUserClientConnection.sendResult(AbstractDisposableUserClientConnection.java:85) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:782) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.work.foreman.QueryStateProcessor.checkCommonStates(QueryStateProcessor.java:325) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.work.foreman.QueryStateProcessor.planning(QueryStateProcessor.java:221) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.work.foreman.QueryStateProcessor.moveToState(QueryStateProcessor.java:83) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:281) ~[drill-java-exec-1.13.0.jar:1.13.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_144]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_144]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_144]
2018-04-14 14:27:08,818 [252e1a73-4a10-5b33-00fa-6109db8680e2:foreman] INFO  o.apache.drill.exec.work.WorkManager - Waiting for 0 queries to complete before shutting down
2018-04-14 14:27:08,818 [252e1a73-4a10-5b33-00fa-6109db8680e2:foreman] INFO  o.apache.drill.exec.work.WorkManager - Waiting for 0 running fragments to complete before shutting down

0 个答案:

没有答案