Refactor AckDistributor, add synchronization test
Refactor code of appending to HDFS