我在直线存在并使用命令的机器上
beeline -u "jdbc:hive2://bdm05:10000/test;principal=hive/_HOST@BIGDATA-INT" -n myuser
我需要使用 python 和 pyhive 来处理带有熊猫的表。
from pyhive import hive
conn = hive.Connection(
host = "jdbc:hive2://bdm05:10000/test;principal=hive/_HOST@BIGDATA-INT",
port = 10000,
username = myuser,
database = 'test')
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
File "/usr/local/lib/python2.7/dist-packages/pyhive/hive.py", line 86, in __init__
self._transport.open()
File "/usr/local/lib/python2.7/dist-packages/thrift_sasl/__init__.py", line 61, in open
self._trans.open()
File "/usr/local/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line 101, in open
message=message)
thrift.transport.TTransport.TTransportException: Could not connect to jdbc:hive2://bdm05:10000/test;principal=hive/_HOST@BIGDATA-INT:10000
从 beeline 命令开始的 pyhive 语法到底是什么?