Python使用Hive和Kerberos身份验证连接到Hadoop

时间:2016-11-04 15:08:09

标签: python hadoop hive kerberos hiveql

我正在尝试使用Kerberos将python连接到使用Hive的 Hadoop 。尝试了各种来源但未能连接

 import pyhs2
conn_config = {'krb_host': 'hostname', 'krb_service': 'hive'}
pyhs2.connect(host='hostname',
                   port=10000,
                   authMechanism="KERBEROS",
                   password="********",
                  user='hostname@SCGLOBALUAT.ADUAT.SCOTIACAPITAL.COM')

遇到错误:

authMechanism="KERBEROS") as conn:
  File "build\bdist.win-amd64\egg\pyhs2\__init__.py", line 7, in connect
  File "build\bdist.win-amd64\egg\pyhs2\connections.py", line 46, in __init__
  File "build\bdist.win-amd64\egg\pyhs2\cloudera\thrift_sasl.py", line 66, in open
thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2

可以请有人帮我提供明确的说明,将python连接到 Hadoop使用Hive with Kerberos Ticket

0 个答案:

没有答案