hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Reading while appending in 0.21
Date Tue, 12 Jan 2010 00:42:28 GMT
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

Mime
View raw message