将 Apache Zeppelin 连接到 Hive [英] Connect Apache Zeppelin to Hive

查看:38
本文介绍了将 Apache Zeppelin 连接到 Hive的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将我的 apache zeppelin 与我的 hive Metastore 连接起来.我使用 zeppelin 0.7.3,所以没有只有 jdbc 的 hive 解释器.我已将 hive-site.xml 复制到 zeppelin conf 文件夹,但我不知道如何创建新的 hive 解释器.

I try to connect my apache zeppelin with my hive metastore. I use zeppelin 0.7.3 so there is not a hive interpreter only jdbc. I have copied my hive-site.xml to zeppelin conf folder but I don't know how to create a new hive interpreter.

我也尝试通过 spark 的 hive 上下文访问 hive 表,但是当我尝试这种方式时,我看不到我的 hive 数据库,只显示了一个默认数据库.

I also tried to access hive tables through spark's hive context but when I try this way, I can not see my hive databases only a default database is shown.

谁能解释一下如何创建 hive 解释器或如何正确地通过 spark 访问我的 hive Metastore?

Can someone explain either how to create a hive interpreter or how to access my hive metastore through spark correctly?

感谢任何答案.

推荐答案

我按照这个解决了 文档.在 jdbc 连接器中添加此参数后,您应该能够使用

I solved it by following this documentation. After adding this parameters in jdbc connector you should be able to run hive interpreter with

%jdbc(hive)

就我而言,这有点棘手,因为我使用了 Cloudera Hadoop,因此标准 jdbc hive 连接器无法正常工作.因此,我将外部 hive-jdbc.jar 更改为适合我的 cdh 版本(对于 cdh 5.9.- 例如它位于 此处).

In my case it was a little trickier because I used Cloudera Hadoop so the standard jdbc hive connector was not working. So I changed the external hive-jdbc.jar with the one suitable for my cdh version (for cdh 5.9.- for example it located here).

我还发现您可以将 hive.url 更改为用于 impala 端口的 hive.url,如果您愿意,可以使用 jdbc 连接到 impala.

I also find out that you can change hive.url with the one for impala port and connect with jdbc to impala if you prefer.

这篇关于将 Apache Zeppelin 连接到 Hive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆