In the current HDFS implementation (0.23.3), hflush and hsync same. hsync calls hflush . hflush ensures that cleared data becomes visible to new readers. It is not guaranteed that data has been flushed to persistent storage on a datanode. Thus, using hflush may lose some data if the datanode fails. hsync intended to ensure that all data is written to a disk device, but not implemented .
In alpha HDFS 2.0. *, hsync is executing correctly.
You can get more details in HBase, HDFS and long sync .
zsxwing
source share