[prev in list] [next in list] [prev in thread] [next in thread]
List: hadoop-user
Subject: MapFile.Reader and seek
From: schnitzi <mark.schnitzius () fastsearch ! com>
Date: 2009-01-29 22:45:51
Message-ID: 21737717.post () talk ! nabble ! com
[Download RAW message or body]
Greetings all... I have a situation where I want to read a range of keys and
values out of a MapFile. So I have something like this:
MapFile.Reader indexReader = new MapFile.Reader(fs, path.toString(),
configuration)
boolean seekSuccess = indexReader.seek(from);
boolean readSuccess = indexReader.next(keyValue, value);
while (readSuccess && ...)
The problem seems to be that while seekSuccess is returning true, when I
call next() to get the value there, it's returning the value *after* the key
that I called seek() on. So if, say, my keys are Text("id0") through
Text("id9"), and I seek for Text("id3"), calling next() will return
Text("id4") and its associated value, not Text("id3").
I would expect next() to return the key/value at the seek location, not the
one after it. Am I doing something wrong? Otherwise, what good is seek(),
really?
--
View this message in context: http://www.nabble.com/MapFile.Reader-and-seek-tp21737717p21737717.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic