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 Paul Ingles <pa...@oobaloo.co.uk> on 2010/02/19 09:35:25 UTC

Behaviour of FileSystem.rename() and hadoop fs -mv command

Hi,

I'm hoping someone can point out where I've been particularly silly.

The behaviour I've observed when using the fs shell -mv command is that it will create any parent directories whilst doing the move? This appears to call rename on the FileSystem, which, when I've tried invoking directly doesn't seem to create the parent directories- it just returns false?

If I want to move a file (creating any parent directories) on HDFS is there an existing class I can use?

Thanks,
Paul