hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Douglas <chri...@yahoo-inc.com>
Subject Re: How to move files from one location to another on hadoop
Date Fri, 12 Sep 2008 17:28:14 GMT
Copying between filesystems, particularly between HDFS filesystems, is  
best done with distcp:

http://hadoop.apache.org/core/docs/r0.18.0/distcp.html

-C

On Sep 12, 2008, at 8:04 AM, James Moore wrote:

> On Wed, Jul 30, 2008 at 2:06 PM, Rutuja Joshi <rutuja@flurry.com>  
> wrote:
>> Could anyone suggest any efficient way to move files from one  
>> location to
>> another on Hadoop. Please note that both the locations are on HDFS.
>> I tried looking for inbuilt file system APIs but couldn't find  
>> anything
>> suitable.
>
> The code you want to start with is:
>
> src/core/org/apache/hadoop/fs/FsShell.java
>
> (in 0.18.0, but I think it's been around for a while)
>
> That's where you'll see the implementation of 'hadoop dfs -mv filea
> fileb' - in this case, you're looking for rename().
>
> -- 
> James Moore | james@restphone.com
> Ruby and Ruby on Rails consulting
> blog.restphone.com


Mime
View raw message