accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob.Thor...@l-3com.com
Subject RE: VersioningIterator - Latest version
Date Tue, 29 May 2012 14:02:53 GMT
So my table has maxversions set to 99999 for the table so that rows are kept for every instance
of a KVP update.  And during some scan operations (not all) the user would like to see the
latest version of each row.  So the answer to your question, "Are you trying to keep more
than one version stored, but only see one version when scanning?" is yes.  Are you suggesting
that in the case where I want a scanner to return only one instance of each RowID I can set
that scanner to maxVersion=1 and get that result?  

An example rowset of a table that has maxVersion=99999:

BOB person:father [public] 1234567892 Hello world!
BOB person:father [public] 1234567891 Hello world!
BOB person:father [public] 1234567890 Hello world!
BOB person:uncle [public] 1234567892 Hello world!
BOB person:uncle [public] 1234567891 Hello world!
BOB person:uncle [public] 1234567890 Hello world!
BOB person:brother [public] 1234567892 Hello world!
BOB person:brother [public] 1234567891 Hello world!
BOB person:brother [public] 1234567890 Hello world!

Scanner with maxVersion=1 results in:

BOB person:father [public] 1234567892 Hello world!
BOB person:uncle [public] 1234567892 Hello world!
BOB person:brother [public] 1234567892 Hello world!

Is it possible to set a scanner with a VersioningIterator that has maxVersions=1?

-----Original Message-----
From: Billie J Rinaldi [mailto:billie.j.rinaldi@ugov.gov] 
Sent: Tuesday, May 29, 2012 08:49
To: user@accumulo.apache.org
Subject: Re: VersioningIterator - Latest version

On Tuesday, May 29, 2012 9:38:54 AM, "Bob Thorman" <Bob.Thorman@l-3com.com> wrote:
> Has anyone developed an iterator that returns the latest version of 
> each RowID when the maxVersions is greater than one?

Could you give me an example of what you'd like to do?  The versioning iterator gives you
the latest version of each key when maxVersions is set to 1.  Are you trying to keep more
than one version stored, but only see one version when scanning?  If that's the case, you
could set maxVersions to 1 for the scan scope but set it higher for the other scopes.

Billie
Mime
View raw message