How to connect Hive served in dataproc cluster using pyhive

13 Views Asked by At

Could not connect to any of [('host', port)] Hive Connection is not valid. Error: Could not connect to any of [('host', port)]

I'm trying to connect to hive which is hosted in dataproc cluster using pyhive and facing this error

from pyhive import hive
import pandas as pd

try:
        conn = hive.Connection(host=host, port=port)
        status = True
        print("Hive Connection is valid.")
except Exception as e:
        status = False
        print("Hive Connection is not valid. Error:", e)
0

There are 0 best solutions below