- prerequisites
- pip
- yum -y install python-pip
- yum -y install epel-release
- yum repolist
- apt-get -y install python-pip
- yum -y install python-pip
- pip
- installation
- pip install PyHive
- pip install thrift
- pip install sasl
- pip install thrift-sasl
- sample
- from pyhive import hiveconnection = hive.Connection(host="10.10.14.81", port=10000)
cursor = connection.cursor()
cursor.execute('show databases')
print cursor.fetchall()
- issues
- Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(111, 'Connection refused'))'
- pip --proxy 22.95.21.21:31 install <name>
- Proxy URLs must have explicit schemes
- pip --proxy http://22.95.21.21:31 install <name>
- gcc: error trying to exec 'cc1plus': execvp: No such file or directory
- yum -y install gcc-c++
- fatal error: sasl/sasl.h: No such file or directory
- yum -y install openldap-devel
- apt-get -y install libsasl2-dev python-dev libldap2-dev libssl-dev
- thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found
- yum -y install cyrus-sasl-plain
- Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(111, 'Connection refused'))'
Friday, December 30, 2016
PyHive
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.