hadoop - Python 2.6.6 and hive connectivity issue? -


i have vm default python version 2.6.6 , hive 1.2. have installed pyhs2 successfully. when run python script error below.

file "test.py", line 7, in <module> pyhs2.connect(host='localhost', port=10000, authmechanism="plain", user='hive', password='hive', database='xxxx') conn: file "/usr/lib/python2.6/site-packages/pyhs2/__init__.py", line 7, in connect return connection(*args, **kwargs) file "/usr/lib/python2.6/site-packages/pyhs2/connections.py", line 46, in __init__ transport.open() file "/usr/lib/python2.6/site-packages/pyhs2/cloudera/thrift_sasl.py", line 55, in open self._trans.open() file "/usr/lib64/python2.6/site-packages/thrift/transport/tsocket.py", line 101, in open message=message) thrift.transport.ttransport.ttransportexception: not connect localhost:10000 

in hive-site.xml have below configuration.

<property>   <name>hive.server2.authentication</name>   <value>none</value> </property> <property>   <name>javax.jdo.option.connectionusername</name>   <value>hive</value> </property> <property>   <name>javax.jdo.option.connectionpassword</name>   <value>hive</value> </property> 

when use below script:

with pyhs2.connect(host='localhost', port=10000, authmechanism="none", user='hive', password='hive', database='xxxx') conn: 

i error below:

notimplementederror: authmechanism either not supported or not implemented. 

please help!

please note client not allow me upgrade python version or change authentication mechanism in hive.

thanks in advance.

1) check https://github.com/bradruderman/pyhs2/blob/master/pyhs2/connections.py

authmechanisms = set(['nosasl', 'plain', 'kerberos', 'ldap']) 

authmechanisms should 1 of these

2) error on thrift.transport.ttransport.ttransportexception: not connect localhost:10000 type netstat -a -n | grep 10000 , check service listening on port 10000


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -