Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FCBE10E76 for ; Thu, 13 Mar 2014 19:00:13 +0000 (UTC) Received: (qmail 19992 invoked by uid 500); 13 Mar 2014 19:00:12 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 19813 invoked by uid 500); 13 Mar 2014 19:00:11 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 19796 invoked by uid 99); 13 Mar 2014 19:00:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2014 19:00:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of billie.rinaldi@gmail.com designates 209.85.219.41 as permitted sender) Received: from [209.85.219.41] (HELO mail-oa0-f41.google.com) (209.85.219.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2014 19:00:06 +0000 Received: by mail-oa0-f41.google.com with SMTP id j17so1545224oag.0 for ; Thu, 13 Mar 2014 11:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vslcgzEKrvtgMZJEDSNRyA8gK8uaej6nKXCgG6mSeic=; b=ce+r3LukhwIA+rRKhHhr2xZM8bMmUD2gD/Ke1qGTHEP1KDGtA1VDnbRejSIyZhthkX cdx1b4LD6Rk83NYd/kTByIZ0DkJIgN1UhZGVJeT4+RqbiAXKOZ3pV8U9LKgfoVin3+8r gDkK8700S4Vyc469DhONiJrthtRP1A3Q3VnflM+pE9nVE/eie0MdU6Mc/Cy43+ep7OaI 9MiUdBwFKCMmR6fxKKa/veq3E9wpymsCLNCbQut2iZrFUinJeslbou8Kf3hZUbba1+0H MpilbyVIjnWjqxSZTWfKyyZIE64hxal6z+WnhWQUkQcTmeVyo7X+va4gMSgjClIeoEQX ZZ1Q== MIME-Version: 1.0 X-Received: by 10.182.196.3 with SMTP id ii3mr2795669obc.11.1394737185938; Thu, 13 Mar 2014 11:59:45 -0700 (PDT) Received: by 10.76.11.9 with HTTP; Thu, 13 Mar 2014 11:59:45 -0700 (PDT) In-Reply-To: <5321F7A2.5040602@ccri.com> References: <5321F7A2.5040602@ccri.com> Date: Thu, 13 Mar 2014 11:59:45 -0700 Message-ID: Subject: Re: Too Many Versions! From: Billie Rinaldi To: "user@accumulo.apache.org" , John Armstrong Content-Type: multipart/alternative; boundary=089e015383e485e37904f4818e82 X-Virus-Checked: Checked by ClamAV on apache.org --089e015383e485e37904f4818e82 Content-Type: text/plain; charset=ISO-8859-1 When you say that you have configured your table to keep maxint versions of each key, do you mean that another versioning iterator already exists on the table with a different number of max versions? What is the name and priority of this iterator? On Thu, Mar 13, 2014 at 11:23 AM, John Armstrong wrote: > Using Accumulo 1.4.3, I have a table configured to keep Many (maxint) > versions of each key, with the version being interpreted as a timestamp. > Given a set of times I'm interested in, I can pull out the data at exactly > those times with no problem. > > But I also want another behavior: if I don't have a particular time, I > want to respond with the most recent version of the data. I'm trying to > use this code: > > void setScannerForTimestamp(Scanner scanner, DateTime timestamp) { > if (timestamp == null) { > IteratorSetting cfg = new IteratorSetting(10, "vers", > VersioningIterator.class) > VersioningIterator.setMaxVersions(cfg, 1) > scanner.addScanIterator(cfg) > } else { > TimestampSetIterator.setupIterator(scanner, timestamp) > } > } > > where TimestampSetIterator is my own custom iterator that's already > working. > > In my table, I have 76063 different data points, each with 31 versions. > When I pass a null timestamp, I expect to get back 76063 entries. > Instead, I get 76063*31 = 2357953 entries. That is, it looks like the > table is ignoring the part where I setMaxVersions to 1. What am I missing? > --089e015383e485e37904f4818e82 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
When you say that you have configured your table= to keep maxint versions of each key, do you mean that another versioning i= terator already exists on the table with a different number of max versions= ?=A0 What is the name and priority of this iterator?

On Thu, Mar 13, 2= 014 at 11:23 AM, John Armstrong <jrja@ccri.com> wrote:
Using Accumulo 1.4.3, I have a table configu= red to keep Many (maxint) versions of each key, with the version being inte= rpreted as a timestamp. =A0Given a set of times I'm interested in, I ca= n pull out the data at exactly those times with no problem.

But I also want another behavior: if I don't have a particular time, I = want to respond with the most recent version of the data. =A0I'm trying= to use this code:

=A0 void setScannerForTimestamp(Scanner scanner, DateTime timestamp) {
=A0 =A0 if (timestamp =3D=3D null) {
=A0 =A0 =A0 =A0 IteratorSetting cfg =3D new IteratorSetting(10, "vers&= quot;, VersioningIterator.class)
=A0 =A0 =A0 =A0 VersioningIterator.setMaxVersions(cfg, 1)
=A0 =A0 =A0 =A0 scanner.addScanIterator(cfg)
=A0 =A0 } else {
=A0 =A0 =A0 TimestampSetIterator.setupIterator(scanner, timestamp) =A0 =A0 }
=A0 }

where TimestampSetIterator is my own custom iterator that's already wor= king.

In my table, I have 76063 different data points, each with 31 versions. =A0= When I pass a null timestamp, I expect to get back 76063 entries. =A0Instea= d, I get 76063*31 =3D 2357953 entries. =A0That is, it looks like the table = is ignoring the part where I setMaxVersions to 1. =A0What am I missing?


--089e015383e485e37904f4818e82--