简体   繁体   English

Python Hive-PyHive连接重置问题

[英]Python Hive-PyHive Connection reset issue

I am able to connect to hive from Python using PyHive library. 我可以使用PyHive库从Python连接到蜂巢。 While fetching data from hive using PyHive I am facing issue Connection reset by peer . 当使用PyHive从hive中获取数据时,我遇到Connection reset by peer问题。

After connection established I am fetching data from hive using PyHive from Python. 建立连接后,我正在使用来自Python的PyHive从hive获取数据。 Connection is getting successful but while fetching data from hive it runs for fore than 5 mins and then throws connection reset by peer . 连接已成功,但是从蜂巢中获取数据时,连接运行了5分钟以上,然后引发connection reset by peer

from pyhive import 
hive conn = hive.Connection(host="host1", port="",auth="", database="",kerberos_service_name="") #successfully connection established 
cur = conn.cursor() cur.execute(query1) #(sometimes it works and some times it throws "Connection reset by peer" if query runs more than 5min)

Not recognizing connection from server site can result into this error. 无法识别来自服务器站点的连接可能导致此错误。 Can you please try killing your python process using pkill -9 pid ? 您能尝试使用pkill -9 pid杀死python进程吗? Because if you trying to connect to hive using two python scripts at same time, it might result into not recognizing connection. 因为如果您尝试同时使用两个python脚本连接到配置单元,则可能会导致无法识别连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM