Thanks for the reviews, Robert Kanter and Andrew Wang!
I'll give it a go with a static variable and add some paragraph tags.
On the probing logic, the reason I do it that way is to get synchronization across daemons. I let HDFS sort out who gets any given file name. If I list files first, the list of files could change by the time I go to create the file.
On removing the throws clause, I'm pretty sure that has no adverse effect. It still adhere's to the interface regardless of whether the throws cause is contracted or the return type is more specific.
About sleeping in the flush test, let's talk alternatives. I did actually write the test with a sleep. If I don't wait for the flusher thread to roll over and flush, then how do I test it? I can force the flush to happen on demand, but if I do that, I'm not testing the timing of the thread; I'm just testing that the flush behaves as expected. Do we just assume that timing works and only test the behavior?