// XXX One should check for this later, when actually
// XXX reading the entries.
FetcherOutput fo = new FetcherOutput();
fetcherReader.next(fo);
started = fo.getFetchDate();
LongWritable w = new LongWritable(-1);
try {
fetcherReader.finalKey(w);
} catch (Throwable eof) {
// the file is truncated - probably due to a crashed fetcher.
// Use just the part that we can...
LOG.warning(" - data in segment " + dir + " is corrupt, using only " + w.get() + " entries.");
}
// go back until you get a good entry
size = w.get()+1;
boolean ok = false;
int back = 0;
do {
try {
fetcherReader.seek(size - 2 - back);