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 F0E5AF164 for ; Wed, 24 Apr 2013 00:13:10 +0000 (UTC) Received: (qmail 79767 invoked by uid 500); 24 Apr 2013 00:13:10 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 79691 invoked by uid 500); 24 Apr 2013 00:13:10 -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 79681 invoked by uid 99); 24 Apr 2013 00:13:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 00:13:10 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rkreddy@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 00:13:04 +0000 Received: by mail-lb0-f175.google.com with SMTP id w20so330197lbh.20 for ; Tue, 23 Apr 2013 17:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=vJ44ufpyPN5nY9fSqtapX6gBTM32SpIbWig6DcFjaGs=; b=yRyOnPCyrYQOLs0Fk2sSBu7TkBShnUhlQfNAw5HAYULNbgfpLmx5gbXPzPWYr+J7Nj H3FMKpsoZsHYctK6EFbgOCCWkY6mMYnsSAa4/TS0Qxbok654bDShGm0tOBt87WAQHNly HAMl+5ixJ0EwLKk9hEerZqpCzl7x24Pfnyuw5waXQZeKOtUcVq/kcos3S7kwbd+Xk9eY j6ZNVlvVFAJhHHNig+oyeJfj86S2SP0yaJRPjOn0uMEhgBViDzeKpQyxE2PZins0ju6a nTr+Khmtk5w/yec4J305vjjn75ciZ3SS4Y/vlUHoD612z7/kLhr32pcFValPD1ZHSFNq 5kTg== MIME-Version: 1.0 X-Received: by 10.112.155.67 with SMTP id vu3mr10146849lbb.109.1366762363788; Tue, 23 Apr 2013 17:12:43 -0700 (PDT) Received: by 10.112.42.130 with HTTP; Tue, 23 Apr 2013 17:12:43 -0700 (PDT) In-Reply-To: References: Date: Tue, 23 Apr 2013 20:12:43 -0400 Message-ID: Subject: Re: timestamp order From: Venkat To: user@accumulo.apache.org Content-Type: multipart/alternative; boundary=089e0118306c2fa32904db1029d6 X-Virus-Checked: Checked by ClamAV on apache.org --089e0118306c2fa32904db1029d6 Content-Type: text/plain; charset=ISO-8859-1 Thanks Keith, This is a great suggestion. Trying out the reverse of that .. (999999999999 - timestamp)+machineID Thanks ! On Tue, Apr 23, 2013 at 7:59 AM, Keith Turner wrote: > > > > On Mon, Apr 22, 2013 at 8:59 PM, Venkat wrote: > >> It looks like versioningiterator gives me the past versions for a cell >> .... but I need to look across rows .. >> >> I am inserting time series data for set of machines into accumulo and i >> am using a combo of machineid + timestamp as the row ID and metric as the >> cq. So for me to get the last time a metric has been inserted for an >> asset, i need to look across row IDs and get the last 5 rows that got >> inserted with that metric ... >> > > You could consider sorting your data such that the most recent timestamps > come first. If you insert (machineid + (999999999999 - timestamp)). To > get the 5 most recent row, start scanning at (machineid + 999999999999) and > stop when you have 5 rows. I picked a completely arbitrary number of 9's > for the example, not sure what time resolution its appropriate for. > > >> >> >> >> On Mon, Apr 22, 2013 at 2:48 PM, Billie Rinaldi > > wrote: >> >>> You could use a VersioningIterator with maxVersions set to 5. >>> >>> Billie >>> >>> >>> >>> On Mon, Apr 22, 2013 at 11:29 AM, Venkat wrote: >>> >>>> hello accumulo, >>>> >>>> what is a good way to get rows in chronological order ? i am trying >>>> to get to a use case of "give me the last 5 inserted for this particular >>>> cf, cq ..." timestampfilter works well when I know the times but i dont >>>> know the exact times of insertion. >>>> >>> >>> >> > --089e0118306c2fa32904db1029d6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Keith, This is a great suggestion. Trying out the r= everse of that ..=A0(999999999999 - timestamp)+machineID=A0

Thanks !


On Tue, Apr 23, 2013 at 7:59 AM, Keith Turner <keith= @deenlo.com> wrote:



On Mon, Apr 22, 20= 13 at 8:59 PM, Venkat <rkreddy@gmail.com> wrote:
It looks like versioningiterator gives me= the past versions for a cell =A0.... but I need to look across rows ..
I am inserting time series data for set of machines into acc= umulo and i am using a combo of machineid + timestamp as the row ID and met= ric as the cq. =A0So for me to get the last time a metric has been inserted= for an asset, i need to look across row IDs and get the last 5 rows that g= ot inserted with that metric ...

You could consider sorting you= r data such that the most recent timestamps come first. =A0 If you insert (= machineid + (999999999999 - timestamp)). =A0 To get the 5 most recent row, = start scanning at=A0(machineid + 999999999999) and stop when you have 5 row= s. =A0 I picked a completely arbitrary number of 9's for the example, n= ot sure what time resolution its appropriate for.




On Mon, Apr 22, 2013 at 2:48 PM, Billie Ri= naldi <billie.rinaldi@gmail.com> wrote:
You could use a VersioningIterator with m= axVersions set to 5.

Billie



On Mon, Apr 22, 2013 at 11:29 AM, Venkat <rkreddy@gmai= l.com> wrote:
hello accumulo,=A0

wha= t is a good way to get rows in chronological order ? =A0 i am trying to get= to a use case of "give me the last 5 inserted for this particular cf,= cq ..." =A0timestampfilter works well when I know the times but i don= t know the exact times of insertion.




--089e0118306c2fa32904db1029d6--