我正在尝试从我的表中读取数据,在hive中使用drill。为此,我用下面提到的配置创建了hive存储插件
{
"type": "hive",
"enabled": true,
"configProps": {
"hive.metastore.uris": "thrift://<ip>:<port>",
"fs.default.name": "hdfs://<ip>:<port>/",
"hive.metastore.sasl.enabled": "false",
"hive.server2.enable.doAs": "true",
"hive.metastore.execute.setugi": "true"
}
}
有了它,我可以看到配置单元中的数据库,但是当我尝试访问特定数据库中的任何表时
select * from hive.db.abc;
它抛出以下错误
org.apache.drill.common.exceptions.userremoteexception:验证错误:从第1行第15列到第1行第18列:在“hive.db”sql查询null中找不到对象“”[错误id:centos2.example上的b6c56276-6255-4b5b-a600-746dbc2f3d67。com:31010](org.apache.calcite.runtime.calcitecontextexception)从第1行第15列到第1行,第18列:在“hive.db”sun.reflect.nativeconstructoraccessorimpl.newinstance0()中找不到对象“”:-2 sun.reflect.nativeconstructoraccessorimpl.newinstance():62 sun.reflect.delegatingconstructoraccessorimpl.newinstance():45 java.lang.reflect.constructor.newinstance():423 org.apache.calcite.runtime.resources$exinstwithcause.ex():463org.apache.calcite.sql.sqlutil.newcontextexception():800 org.apache.calcite.sql.sqlutil.newcontextexception():788 org.apache.calcite.sql.validate.sqlvalidatorimpl.newvalidationerror():4703 org.apache.calcite.sql.validate.identifiernamespace.resolveimpl():127 org.apache.calcite.sql.validate.identifiernamespace.validateimpl():177org.apache.calcite.sql.validate.abstractnamespace.validate():84 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatenamespace():947 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatefrom():928 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatefrom():2972org.apache.drill.exec.planner.sql.sqlconverter$drillvalidator.validatefrom():267 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatefrom():2957 org.apache.drill.exec.planner.sql.sqlconverter$drillvalidator.validatefrom():267 org.apache.calcite.sql.validatorimpl.validateselect():3216org.apache.calcite.sql.validate.selectnamespace.validateimpl():60 org.apache.calcite.sql.validate.abstractnamespace.validate():84 org.apache.calcite.sql.validatorimpl.validatenamespace():947 org.apache.calcite.sql.validatorimpl.validatequery():928 org.apache.calcite.sql.sqlselect.validate():226org.apache.calcite.sql.validate.sqlvalidatorimpl.validatescopedexpression():903 org.apache.calcite.sql.validate.sqlvalidatorimpl.validate():613 org.apache.drill.exec.planner.sql.sqlconverter.validate():190 org.apache.drill.exec.planner.sql.handlers.defaultsqlhandler.validatenode():630org.apache.drill.exec.planner.sql.handlers.defaultsqlhandler.validateandconvert():202 org.apache.drill.exec.planner.sql.handlers.defaultsqlhandler.getplan():174 org.apache.drill.exec.planner.sql.drillsqlworker.getplan():146 org.apache.drill.exec.planner.sql.drillsqlworker.getplan():84 org.apache.drill.exec.work.foreman.foreman.runsql():567org.apache.drill.exec.work.foreman.foreman.run():264 java.util.concurrent.threadpoolexecutor.runworker():1149 java.util.concurrent.threadpoolexecutor$worker.run():624 java.lang.thread.run():748由(org.apache.calcite.sql.validate.sqlvalidatorexception)对象“”引起sun.reflect.nativeconstructoraccessorimpl.newinstance0():-2 sun.reflect.nativeconstructoraccessorimpl.newinstance():62 sun.reflect.delegatingconstructoraccessorimpl.newinstance():45 java.lang.reflect.constructor.newinstance():423 org.apache.calcite.runtime.resources$exinstwithcause.ex():463 org.apache.calcite.runtime.resources$exinst.ex():572org.apache.calcite.sql.sqlutil.newcontextexception():800 org.apache.calcite.sql.sqlutil.newcontextexception():788 org.apache.calcite.sql.validate.sqlvalidatorimpl.newvalidationerror():4703 org.apache.calcite.sql.validate.identifiernamespace.resolveimpl():127 org.apache.calcite.sql.validate.identifiernamespace.validateimpl():177org.apache.calcite.sql.validate.abstractnamespace.validate():84 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatenamespace():947 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatefrom():928 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatefrom():2972org.apache.drill.exec.planner.sql.sqlconverter$drillvalidator.validatefrom():267 org.apache.calcite.sql.validate.sqlvalidatorimpl.validatefrom():2957 org.apache.drill.exec.planner.sql.sqlconverter$drillvalidator.validatefrom():267 org.apache.calcite.sql.validatorimpl.validateselect():3216org.apache.calcite.sql.validate.selectnamespace.validateimpl():60 org.apache.calcite.sql.validate.abstractnamespace.validate():84 org.apache.calcite.sql.validatorimpl.validatenamespace():947 org.apache.calcite.sql.validatorimpl.validatequery():928 org.apache.calcite.sql.sqlselect.validate():226org.apache.calcite.sql.validate.sqlvalidatorimpl.validatescopedexpression():903 org.apache.calcite.sql.validate.sqlvalidatorimpl.validate():613 org.apache.drill.exec.planner.sql.sqlconverter.validate():190 org.apache.drill.exec.planner.sql.handlers.defaultsqlhandler.validatenode():630org.apache.drill.exec.planner.sql.handlers.defaultsqlhandler.validateandconvert():202 org.apache.drill.exec.planner.sql.handlers.defaultsqlhandler.getplan():174 org.apache.drill.exec.planner.sql.drillsqlworker.getplan():146 org.apache.drill.exec.planner.sql.drillsqlworker.getplan():84 org.apache.drill.exec.work.foreman.foreman.runsql():567org.apache.drill.exec.work.foreman.foreman.run():264 java.util.concurrent.threadpoolexecutor.runworker():1149 java.util.concurrent.threadpoolexecutor$worker.run():624 java.lang.thread.run():748
1条答案
按热度按时间eh57zj3b1#
您应该升级到更新的配置单元版本。对于drill 1.13,它是hive 2.3.2版本?从drill-1.13开始,drill利用2.3.2版本的hive客户端[1]。
即将支持Hive3.0版本[2]。
另外,请遵循以下指南,为您的环境提供必要的配置单元插件配置[3]。您可以省略“hive.metastore.sasl.enabled”、“hive.server2.enable.doas”和“hive.metastore.execute.setugi”属性,因为您已经指定了默认值[4]。关于“hive.metastore.uris”和“fs.default.name”,您应该为它们指定与hive-site.xml中相同的值。
[1] https://drill.apache.org/docs/hive-storage-plugin
[2] https://issues.apache.org/jira/browse/drill-6604
[3] https://drill.apache.org/docs/hive-storage-plugin/#hive-远程元存储配置
[4] https://github.com/apache/hive/blob/rel/release-2.3.2/common/src/java/org/apache/hadoop/hive/conf/hiveconf.java#l824