Python-Hive connectivity issue - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Python-Hive connectivity issue (/thread-16560.html) |
Python-Hive connectivity issue - rekhagaonkar - Mar-05-2019 We have Virtual Private network in which we have Windows Server box, and Hadoop Distribution based on Hortonworks installed on several data nodes on Redhat. The Python script is installed on Windows machine and we are trying to access Hive tables available on the said Hadoop cluster. On Hive 10000 port number is open to listen to the external requests. From Windows box ODBC connectivity is working fine with said port, but below mentioned Python script is failing to execute with errors. For that we have installed some mandatory packages which are needed for the hive connection as below; • pyhive • sasl • thrift-sasl • pure-sasl Please find below code: from pyhive import hive from TCLIService.ttypes import TOperationState import sasl import thrift import pandas as pd import pyhs2 cursor = hive.connect(host='dnanoripaihos01.retailaip.local', auth='KERBEROS', port='10000',kerberos_service_name='hive').cursor() cursor.execute('SELECT * FROM cancellations LIMIT 50') print (cursor.fetchall())When we execute this script it gives us below error: Please help us to resolve this issue.
|