【发布时间】:2018-08-29 15:57:22
【问题描述】:
我可以使用 PyHive 库从 Python 连接到 hive。在使用 PyHive 从 hive 获取数据时,我遇到了问题Connection reset by peer。
建立连接后,我正在使用 Python 中的 PyHive 从 hive 中获取数据。连接成功,但在从 hive 获取数据时,它运行了 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)
【问题讨论】:
-
你能给我们看看relevant code好吗?
-
from pyhive import hive conn = hive.Connection(host="host1", port="",auth="", database="",kerberos_service_name="") -> 连接成功 cur = conn.cursor() cur.execute(query1) -> (如果查询运行超过 5 分钟,有时它会起作用,有时它会抛出“对等连接重置”)