In 0.14.1 and in trunk, when I try
% hadoop dfs -get /user/knoguchi/aaa aaa
get: Failed to rename tmp file to local destination "aaa". Remote source file "/user/knoguchi/aaa" is saved to "/tmp/_copyToLocal_aaa30478".
% hadoop dfs -get /user/knoguchi/aaa ./aaa
% hadoop dfs -get /user/knoguchi/aaa /home/knoguchi/aaa
My guess. With change in
HADOOP-1292, it now creates a tmp file when -copyToLocal.
When destination path is passed without any directory, tmp file is created under '/tmp'. Otherwise, it uses the same directory as the destination path.
In Java API for File.renameTo,
" The rename operation might not be able to move a file from one filesystem to another",
so renameTo call from /tmp/_tmpfile to /home/knoguchi can fail.