hadoop-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Luengo Cabanillas <cabi...@gmail.com>
Subject Re: MOVING FILES BETWEEN DIRS IN HDFS
Date Sun, 10 Jan 2010 21:38:11 GMT
Thanks a lot for the reply Eric. I´ll give it a try.

2010/1/10 Eric Sammer <eric@lifeless.net>

> On 1/10/10 12:29 PM, Alberto Luengo Cabanillas wrote:
> > Hi everyone! I´m trying to move a file from a dir in HDFS to another via
> API
> > (more specifically, with *FileUtil* class). This is because I´m launching
> a
> > program within Eclipse against a remote HDFS. Is the "copy" method proper
> > for what I want to do, or is another alternative (like copyTo-copyFrom
> > sequence)?
> > Thanks a lot in advance.
> >
>
> Alberto:
>
> There is no method for moving a file in FileUtil because it's already
> just a single simple method call. Use FileSystem#rename(Path, Path)
> instead to move files. The copy methods will leave you with two of the
> same file (which you probably don't want).
>
> Hope that helps.
> --
> Eric Sammer
> eric@lifeless.net
> http://esammer.blogspot.com
>



-- 
Alberto

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message