Hi Genius,

If I understand correctly, the shell command "cp" for the HDFS is not
atomic, is that correct?

For example:

./bin/hdfs dfs -cp input/a.xml input/b.xml

This command actually does 3 things, 1. read input/a.xml; 2. Create a new
file input/b.xml; 3. Write the content of a.xml to b.xml;

When I looked at the code, and the client side actually does the 3 steps
and there are no lock between the 3 step, does it mean that the cp command
is not guaranteed atomic?


Thanks a lot for your reply.

Reply via email to