|
|
Matt Corgan 2012-09-13, 05:25
Hi guys - I'm working on an interface for KeyValue and also trying to figure out what changes we need to make to KeyValueScanner for prefix compression. One thing that's confusing me is the difference between the seek() and reseek() methods. Could someone take a stab at explaining those since the javadoc is not of much help (kinda circular definition)?
I'd rather not even pollute this email with my best guess, but i think it has something to do with reseek being used when you estimate you'll have to seek many cells ahead, so you "zoom out" to the block index level (or memstore root), whereas seek churns through every cell.
Any help appreciated, Matt
lars hofhansl 2012-09-13, 05:38
reseek is forward only. So a scanner can potentially make use of that fact. A seek can seek to any KV even if that means the scanner is rewound (so to speak) to a KV that sorts before the current one. For example see the implementations of seek(...) and reseek(...) in MemstoreScanner. Is that what you were asking? -- Lars
________________________________ From: Matt Corgan <[EMAIL PROTECTED]> To: dev <[EMAIL PROTECTED]> Sent: Wednesday, September 12, 2012 10:25 PM Subject: KeyValueScanner Hi guys - I'm working on an interface for KeyValue and also trying to figure out what changes we need to make to KeyValueScanner for prefix compression. One thing that's confusing me is the difference between the seek() and reseek() methods. Could someone take a stab at explaining those since the javadoc is not of much help (kinda circular definition)?
I'd rather not even pollute this email with my best guess, but i think it has something to do with reseek being used when you estimate you'll have to seek many cells ahead, so you "zoom out" to the block index level (or memstore root), whereas seek churns through every cell.
Any help appreciated, Matt
Matt Corgan 2012-09-13, 05:53
Thanks Lars - i guess i had it backwards. On Wed, Sep 12, 2012 at 10:38 PM, lars hofhansl <[EMAIL PROTECTED]> wrote:
> reseek is forward only. So a scanner can potentially make use of that fact. > A seek can seek to any KV even if that means the scanner is rewound (so to > speak) to a KV that sorts before the current one. > > > For example see the implementations of seek(...) and reseek(...) in > MemstoreScanner. > > > Is that what you were asking? > > > -- Lars > > > > ________________________________ > From: Matt Corgan <[EMAIL PROTECTED]> > To: dev <[EMAIL PROTECTED]> > Sent: Wednesday, September 12, 2012 10:25 PM > Subject: KeyValueScanner > > Hi guys - I'm working on an interface for KeyValue and also trying to > figure out what changes we need to make to KeyValueScanner for prefix > compression. One thing that's confusing me is the difference between the > seek() and reseek() methods. Could someone take a stab at explaining those > since the javadoc is not of much help (kinda circular definition)? > > I'd rather not even pollute this email with my best guess, but i think it > has something to do with reseek being used when you estimate you'll have to > seek many cells ahead, so you "zoom out" to the block index level (or > memstore root), whereas seek churns through every cell. > > Any help appreciated, > Matt >
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext