英文:
Communicating with hiveserver2 using Golang
问题
我在Oracle Virtual Box中安装了Hortonworks HDP沙盒,并且已经给予了10000端口的访问权限。在Hive配置中,HiveServer2的Thrift端口也设置为10000。我正在使用https://github.com/derekgr/hivething包装器来获取连接。尽管HiveServer2正在运行,但我似乎无法连接到上述提到的包装器。
我尝试了示例程序,但在"db, err := hivething.Connect("127.0.0.1:10000", hivething.DefaultOptions)"这一行之后,程序没有任何反应。它甚至没有执行该行下面的if条件。所以它只是尝试获取连接并停在那里。
我做错了什么?
还有没有其他适用于HiveServer2的好的包装器?
英文:
I have hortonworks HDP sandbox installed inside Oracle Virtual Box. And I've given access to port 10000. In hive configurations hiveserver2 thrift port is set to 10000 also. I'm using https://github.com/derekgr/hivething wrapper to get the connection. Even though hiveserver2 is running I can't seem to connect with the wrapper mentioned above.
I tried the sample program. But it doesn't go anywhere after " db, err := hivething.Connect("127.0.0.1:10000", hivething.DefaultOptions)" line. It doesn't even reach the if condition beneath it. So it's trying to get the connection and stays just as that.
What am I doing wrong?
Is there anymore good wrappers that works with hiveserver2?
答案1
得分: 1
我无法发表评论,所以我将把这个作为答案发布。
首先,从你的虚拟机上尝试使用以下命令检查hiveserver2是否在监听:
telnet localhost 10000
然后再从你的机器上尝试一次。这个命令应该会告诉你首先要查看的地方。
英文:
I can't comment so I'll post this as an answer.
Check if hiveserver2 is actually listening by trying to
> telnet localhost 10000
from your VM first, then from your machine.
It should show you where to look at first.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论