0

I have installed Hadoop and HIVE on windows 10 by following tutorials,

https://exitcondition.com/install-hadoop-windows/ & https://www.youtube.com/watch?v=npyRXkMhrgk respectively.

Both Hadoop and HIVE are running on my machine, I have been able to put files in HDFS and run queries in HIVE, but when I try to connect HIVE with python it gives different errors. Such as

from pyhive import hive

hive.Connection(host='localhost',port=10000,auth='NOSASL')

it gives following error:

 TTransportException: TSocket read 0 bytes

I have tried impala as well but it did not work.

How can I connect python with hive, is it possible on windows 10 or should I shift to linux?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Ayaz49
  • 325
  • 2
  • 4
  • 18

1 Answers1

0

Pyhive had issues with auth = NOSASL in past.. not sure whether it got fixed .

Try hdfs3 python lib

conda install hdfs3
from hdfs3 import HDFileSystem
hdfs=HDFileSystem(host='localhost',port=9000)

More info available here..

https://medium.com/@arush.xtremelife/connecting-hadoop-hdfs-with-python-267234bb68a2

Ganesh Chandrasekaran
  • 1,578
  • 12
  • 17