hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kun Ren <ren.h...@gmail.com>
Subject Cp command is not atomic
Date Wed, 25 May 2016 15:21:38 GMT
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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message