未验证 提交 66f4b292 编写于 作者: D danleifeng 提交者: GitHub

fix hdfs download_dir (#36590)

上级 7bf2aa38
......@@ -842,8 +842,8 @@ class HDFSClient(FS):
if self.is_file(fs_path):
return self._try_download(fs_path, local_path)
# download dir
_, all_files = self.ls_dir(fs_path)
_, all_filenames = self.ls_dir(fs_path)
all_files = [fs_path + i for i in all_filenames]
procs = []
for i in range(multi_processes):
process_datas = self._split_files(all_files, i, multi_processes)
......
......@@ -195,7 +195,7 @@ class FSTestBase(unittest.TestCase):
fs.download(src_file, dst_file)
local = LocalFS()
self.assertTrue(local.is_exist(dst_file))
self.assertTrue(local.is_exist(file1))
local.delete(dst_file)
fs.delete(src_file)
......
......@@ -40,6 +40,7 @@ class FSTest3(FSTestBase):
self._test_upload(fs)
self._test_upload_dir(fs)
self._test_download(fs)
self._test_download_dir(fs)
def test_local(self):
fs = LocalFS()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册