hdfs
hdfs copied to clipboard
Mac use hdfs 2.6.0 connect datanode failed
my client can use namenode(like mkdir or ls), but cannot use datanode,(like download or upload), my network work right this python code run right in centos and ubuntu,but failed with python 3.9 hdfs-2.6.0 macos12.3.1
if __name__ == '__main__':
hdfs_client = HdfsApi()
local_path = "./test_data.csv"
print(hdfs_client.client.list('/'))
print(hdfs_client.client.list('/ppc'))
hdfs_path = "/root/LICENSE.txt"
hdfs_client.get_dataset(hdfs_path, local_path)
when I run it, get
['ppc', 'root']
['LICENSE.txt']
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/hdfs/client.py", line 830, in download
raise err
File "/usr/local/lib/python3.9/site-packages/hdfs/client.py", line 817, in download
_download(fpath_tuple)
File "/usr/local/lib/python3.9/site-packages/hdfs/client.py", line 759, in _download
with self.read(_remote_path, **kwargs) as reader:
File "/usr/local/Cellar/[email protected]/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.9/site-packages/hdfs/client.py", line 687, in read
res = self._open(
File "/usr/local/lib/python3.9/site-packages/hdfs/client.py", line 118, in api_handler
raise err
hdfs.util.HdfsError: b''
there is no useful log with my hadoop server