You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Mohit Anchlia <mo...@gmail.com> on 2011/05/27 21:28:51 UTC
How to copy over using dfs
If I have to overwrite a file I generally use
hadoop dfs -rm <file>
hadoop dfs -copyFromLocal or -put <file>
Is there a command to overwrite/replace the file instead of doing rm first?
Re: How to copy over using dfs
Posted by Mark question <ma...@gmail.com>.
I don't think so, becauseI read somewhere that this is to insure the safety
of the produced data. Hence Hadoop will force you to do this to know what
exactly is happening.
Mark
On Fri, May 27, 2011 at 12:28 PM, Mohit Anchlia <mo...@gmail.com>wrote:
> If I have to overwrite a file I generally use
>
> hadoop dfs -rm <file>
> hadoop dfs -copyFromLocal or -put <file>
>
> Is there a command to overwrite/replace the file instead of doing rm first?
>
Re: How to copy over using dfs
Posted by Harsh J <ha...@cloudera.com>.
Mohit,
On Sat, May 28, 2011 at 12:58 AM, Mohit Anchlia <mo...@gmail.com> wrote:
> If I have to overwrite a file I generally use
>
> hadoop dfs -rm <file>
> hadoop dfs -copyFromLocal or -put <file>
>
> Is there a command to overwrite/replace the file instead of doing rm first?
>
There's no command available right now to do this (best to write a
wrapper script acting as a command, or a custom shell utility
program?)
That said, https://issues.apache.org/jira/browse/HDFS-1608 covers the
addition of -f/-overwrite feature and it may be available in future
releases (possibly 0.23+).
--
Harsh J