Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Moving files


Copy link to this message
-
Re: Moving files
Hi David,

       Can you check the following things,
           1) Whether the user trying to rename has the filesystem
permissions or NOT on the "to" path?
           2) Whether the to directory exists or NOT?
           3) OR you can copy the data first to the to path and then delete
the current path.

Best,
Mahesh Balija,
Calsoft Labs.

On Sun, Nov 25, 2012 at 8:04 AM, David Parks <[EMAIL PROTECTED]> wrote:

> I want to move a file in HDFS after a job using the Java API, I'm trying
> this command but I always get false (could not rename):
>
>         Path from = new
> Path("hdfs://localhost/process-changes/itemtable-r-00001");
>         Path to = new Path("hdfs://localhost/output/itemtable-r-00001");
>         boolean wasCopied = from.getFileSystem(getConf()).rename(from, to);
>
> All I want to do is copy some files from HDFS to S3 at the end of my job,
> but DistCp copies a whole directory, so I think I need to move the files
> around to prepare them for DistCp's directory->directory copy.
>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB