虽然使用apache的查询使用hive metastore钻取错误未知主机异常

时间:2018-01-23 07:31:03

标签: apache-drill hive-metastore

我已成功连接远程hive Metastore与apache Drill。我能够显示远程hdfs的数据库,还能够从数据库中查看表结构。但是在查询数据库时却出错了

Error: SYSTEM ERROR: UnknownHostException: remotename

这是我对apache hive的配置

{
 "type": "hive",
 "enabled": true,
 "configProps": {
 "hive.metastore.uris": "thrift://myremoteIP:PortofThrift",
 "hive.metastore.warehouse.dir": "/tmp/drill_hive_wh",
 "fs.default.name": "hdfs://IP address of remote:port of hdfs from /",
 "hive.metastore.sasl.enabled": "false"
  }
}

这是成功的查询   JDBC:钻头:ZK =本地>描述data_mcsc_mcsc_bill_info;

和结果。

    COLUMN_NAME       |     DATA_TYPE      | IS_NULLABLE  |
+------------------------+--------------------+--------------+
| tran_dt                | CHARACTER VARYING  | YES          |
| tran_tm                | CHARACTER VARYING  | YES          |
| bill_id                | CHARACTER VARYING  | YES          |
| policy_number          | CHARACTER VARYING  | YES          |
| policy_start_date      | CHARACTER VARYING  | YES          |
| policy_end_date        | CHARACTER VARYING  | YES          |

1 个答案:

答案 0 :(得分:1)

More details will be required to provide a complete answer to your question. I can provide some debugging tips here.

  • Verify that the machines running your namenode and metastore are accessible from the machine you are running Drill on. You can use the telnet command to verify that a socket can be opened. If this fails you have a firewall / connectivity issue.
  • Validate that Drill can talk to your HDFS cluster by putting a csv file on HDFS and adding a storage plugin configuration for your HDFS cluster to Drill. Validate that you can query the file from Drill. If this fails you may have not specified the correct port for your HDFS namenode or there may be some other HDFS related issue.

If these debugging tips are insufficient please subscribe to the Apache Drill dev and user lists. You can look at the information here on how to do this http://drill.apache.org/mailinglists/. You can then send your question to the user list, and the Drill team can provide more interactive help with your issue there. Also please include the following information if you send your question to the user list:

  • Your version of Drill.
  • Whether you are running a drill cluster or you are running a simple standalone node.
  • The version of Hive.
  • The Distribution of HDFS you are using (e.g. Big Top, Hortonworks, Cloudera).