Note that when a HDFS block is fully filled it is automatically flushed.

So you can use HDFS hflush() to allow consumers to immediately read the new portion of data written to the file, and you can use this feature to build near-real time applications that use HDFS as the storage.