Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

unable to read or write hdfs file from my local windows machine using pywebhdfs

unable to read or write hdfs file from my local windows machine using pywebhdfs

New Contributor

I am running python program from local windows machine to read and write hdfs file which is installed on sever.

I am running below script

from pywebhdfs.webhdfs import PyWebHdfsClient
hdfs = PyWebHdfsClient(host='XX-XX-XX-XX',port='50070',user_name='XXXXX')

hdfs.read_file("/path/to/hdfs_file")

I am getting below error.

kindly help me to resolve this.

requests.exceptions.ConnectionError: HTTPConnectionPool(host='testserver-gbs-auto-cog1.sl1027443.sl.edst.ibm.com', port=50075): Max retries exceeded with url: /webhdfs/v1/user/test/sample?op=OPEN&namenoderpcaddress=testserver-gbs-auto-cog1.sl1027443.sl.edst.ibm.com:8020&offset=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002807B7EDD30>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

Don't have an account?
Coming from Hortonworks? Activate your account here