ZK-1931/javazab — pull request #38 by m1ch1 (2014-06-25 05:02:55+00:00)
Title: Implement atomic file for proposed / acknowledged epoch files

ZooKeeper uses AtomicFileOutputStream from HDFS. It relies on rename() being atomic, which is not the case for windows. Since we are on java 7, we can use java.nio.file.Files.move() instead.

https://github.com/toddlipcon/hadoop-common/blob/qjm-patchseries/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/AtomicFileOutputStream.java

http://stackoverflow.com/a/10532430