我们正在逐个分区地在群集间移动数据,并且我们需要使用-update -skipcrccheck选项仅用于此目的。为了使用这些选项在每个分区的基础上运行distcp,需要在目标位置已创建分区目录。为此,我需要从目标群集上的远程群集执行-mkdir。
我试图用Google搜索答案,但找不到任何东西。那有可能吗?
[在没有-update或-overwrite的情况下调用DistCp时,DistCp默认值将在/ target下创建目录first /和second /。
distcp -skipcrccheck hdfs://nn1:8020/source/first hdfs://nn1:8020/source/second hdfs://nn2:8020/target
输出:
hdfs://nn2:8020/target/first/1
hdfs://nn2:8020/target/first/2
hdfs://nn2:8020/target/second/10
hdfs://nn2:8020/target/second/20