hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Parks" <davidpark...@yahoo.com>
Subject Moving files
Date Sun, 25 Nov 2012 02:34:38 GMT
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.



Mime
View raw message