In HDFS, if the flush is implemented to send server request to actually commit the pending writes on the storage service side, we could observe in the benchmark runs that the MR jobs are taking much longer. From investigation we see the current implementation for writing events doesn't look right:
This flush is redundant and this statement should be removed. It defeats the purpose of having a separate flush function itself.
Encoder.flush calls flush of the underlying output stream
After patching with the fix the MR jobs could complete normally, please kindly find the patch in attached.