hdfs dfs -put with overwrite?

前端 未结 4 1178
鱼传尺愫
鱼传尺愫 2020-12-29 19:56

I am using

hdfs dfs -put myfile mypath

and for some files I get

put: \'myfile\': File Exists
  • does
4条回答
  •  一向
    一向 (楼主)
    2020-12-29 20:13

    You can overwrite your file in hdfs using -f command.For example

    hadoop fs -put -f  
    

    OR

    hadoop fs -copyFromLocal -f  
    

    It worked fine for me. However -f command won't work in case of get or copyToLocal command. check this question

提交回复
热议问题