Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HDFS >> mail # user >> hflush not working for me?

Copy link to this message
hflush not working for me?
I'm putting together some unit tests up in our application that exercise
hflush.  I'm using minidfscluster and a jar made by building head of the
0.21 branch of hdfs (from about a minute ago).

Code opens a file, writes a bunch of edits, invokes hflush (by calling sync
on DFSDataOutputStream instance) and then, without closing the Writer, opens
a Reader on same file.  This Reader does not see any edits not to mind edits
up to the sync invocation.

I can trace the code and see how on hflush it sends the queued packets of

I studied TestReadWhileWriting.  I've set setBoolean("dfs.support.append",
true) before minidfscluster spins up.  I can't set soft lease to 1 second
because not in same package so I just wait out the default minute.  It
doesn't seem to make a difference.

Do I have to do open as another user?

Thanks for any pointers,