【发布时间】:2017-11-28 22:38:12
【问题描述】:
我在 azure 文件共享中有 2TB 数据,我希望将其复制到 azure 数据湖存储。那应该用相同的目录结构复制。我试过了
az dls fs upload --account eanpdlstore2 --source-path "/root/mymountpoint/ShopperVisionDataRoot/" --destination-path "/pngcaseprocessing/ShopperVisionDataRoot"
但是,将数据从 azure 文件共享复制到 azure 数据湖需要很长时间。有人可以阐明如何进行这项工作或任何其他可行的方法吗?
目录结构类似于 Main_dir/sub_dir/sub_dir/{multiple_data_folders} 并且应该以相同的方式复制。关键是我不想复制 Main_dir/sub_dir/sub_dir/ 下的所有数据文件夹,但每个 sub_dir 中只有两个。所以我试着让这两个到不同的位置。
find DATA_PREP_INPUT2 -maxdepth 1 -mindepth 1 -type d | while IFS= read -r subdir; do
mkdir -p DATA_PREP_INPUT_TEST/"$(basename $subdir)" &&
cp -n -r "$subdir"/{IPD_130288,IPD_130284} DATA_PREP_INPUT_TEST/"$(basename $subdir)"/;
done
然后我可以使用上面的azure命令进行复制。但是复制一个数据目录也需要很长时间。
【问题讨论】:
-
文件共享的记录性能目标是每秒 60 MB,据我计算,传输 2 TB 大约需要 10 个小时。您是否看到性能比这慢得多?如果是这样,您从共享中读取的方式可能还有一些改进空间。但是,如果您看到 2 TB 的速率相当于大约 10 小时,那么您可能处于文件共享的吞吐量限制。
-
嗨,您的代码在哪里运行,它是否在 Azure 的某个地方(可能是虚拟机或 azure shell 等)?还是在您的本地网络上? (+1 对约翰的评论,我的将根据上述答案变得更加相关)。
标签: bash python-3.x azure azure-data-lake