【发布时间】:2023-02-06 08:56:54
【问题描述】:
我正在尝试使用 python 将数据保存到 hdfs 中,所以我厌倦了这段代码:
from hdfs import InsecureClient
Client = InsecureClient('http://localhost/50070', user= 'root')
data = pd.read_csv('New_data.csv')
with client.write('/tmp/New_data.csv') as writer :
data.to_csv(writer)
但我得到一个错误:
HTTPConnectionPool(host=localhost', port=80) : Max retries exceeded with url : /50070/webhdfs/v1/?user .. Failed to establish a new connection
【问题讨论】: