How to overwrite the existing files using hadoop fs -copyToLocal command

前端 未结 8 1165
小蘑菇
小蘑菇 2021-02-01 13:08

Is there any way we can overwrite existing files, while coping from HDFS using:

hadoop fs -copyToLocal  
         


        
8条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 13:13

    You can try with distcp with -update . Main advantage is it will be update the target only when there is change in the file.

    hadoop distcp -update file://source hdfs://namenode/target

    hadoop distcp -update  file:///home/hduser/pigSample/labfiles/SampleData/books.csv  hdfs://10.184.37.158:9000/yesB
    

提交回复
热议问题