【问题标题】:Connection refused while trying to save data into hdfs尝试将数据保存到 hdfs 时连接被拒绝
【发布时间】: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

【问题讨论】:

    标签: python hdfs jupyter


    【解决方案1】:

    我也有同样的问题。有人可以解决这个问题吗?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-17
    • 2021-11-16
    • 2019-10-20
    • 2019-02-09
    • 2020-01-29
    • 2021-12-23
    • 2018-12-02
    相关资源
    最近更新 更多