HDFS读取问题:HTTPConnectionPool(host=, port=50075): Max retries exceeded

在使用python读写HDFS时,遇到以下问题:

ConnectionError: HTTPConnectionPool(host='node1.******.com', port=50075): Max retries exceeded with url: /webhdfs/v1/mytest/products/Trace_info.db?op=OPEN&user.name=root&namenoderpcaddress=node4.******.com:8020&offset=0 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known',))

只要出现Failed to establish a new connection就可以使用以下方法(将HDFS节点与IP对应关系增加到host文件)解决

参考资料:

https://blog.csdn.net/shen_ness/article/details/82786261

 

你可能感兴趣的:(HDFS读写)