Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac use hdfs 2.6.0 connect datanode failed #188

Open
HaoXuan40404 opened this issue Apr 27, 2022 · 2 comments
Open

Mac use hdfs 2.6.0 connect datanode failed #188

HaoXuan40404 opened this issue Apr 27, 2022 · 2 comments

Comments

@HaoXuan40404
Copy link

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''
@HaoXuan40404
Copy link
Author

image

@HaoXuan40404
Copy link
Author

there is no useful log with my hadoop server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant