Jean,
I believe this is how it has been intended to work. If you take a look at the
test src/test/hdfs/org/apache/hadoop/hdfs/TestHFlush.java in HDFS workspace
you'll a comment on this particular aspect in the line 124.
Hope it helps,
Cos
On 1/11/10 16:42 , Jean-Daniel Cryans wrote:
Hi,
I'm trying to use the new hflush function from 0.21 so that a
SequenceFile.Reader could read edits from a SequenceFile.Writer after
a signal on a Condition. If I:
create the Writer
append entries
hflush
create the Reader
next() through the entries
It works fine. But after that if I only next(), using the same reader,
after appending/hflush I won't see the new edits. But, if I create a
new Reader after calling hflush, it works fine.
So this does not work:
create the Writer
append entries
hflush
create the Reader
next() through the entries
append entries
hflush
next() through the entries
append entries
hflush
next() through the entries
This does:
create the Writer
append entries
hflush
create the Reader
next() through the entries
append entries
hflush
create a new Reader
seek
next() through the entries
Is that the intended behavior?
Thx!
J-D