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 6CADDF96A for ; Tue, 23 Apr 2013 12:00:44 +0000 (UTC) Received: (qmail 22201 invoked by uid 500); 23 Apr 2013 12:00:43 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 21822 invoked by uid 500); 23 Apr 2013 12:00:38 -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 21799 invoked by uid 99); 23 Apr 2013 12:00:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 12:00:37 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [209.85.212.53] (HELO mail-vb0-f53.google.com) (209.85.212.53) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 12:00:31 +0000 Received: by mail-vb0-f53.google.com with SMTP id i3so469368vbh.40 for ; Tue, 23 Apr 2013 04:59:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=5cj9dYkfrXqZ3lE8p4PBNp0xXO2lHy7ZfOpvYNQIDeo=; b=c4HUyCjkHCZoaPQ+qdhkpH0naE7brVqwbAA1cwvRkrm3haC4ZQKojOMbOPk41I8FNR c16A+o/EAlaeIuXCJxmHLg1AubG2M2EkwxSPnX6/1FKusyu3iA/7ezrSbwyXP1PO+zEu 2qskarcQGRknE7LeQ+7ZyrLxfcv6U978+lKM99Vv/cJrYULN26W9RXJ9YMJG32OvKVdH NUnrGHw/APgYSWPe6MVVk6ZV/UK7wM3scgJ9mj5a6R6I+MV94edS0LW+Tq11/Z+jfRoH xiMee6rAMOby13ZrYD/LjQlfVV3lgaOWtYEoo8SbBpD0tfK9stsdRRBeZE0OyCeWHMJR 1VSg== MIME-Version: 1.0 X-Received: by 10.52.97.41 with SMTP id dx9mr18270167vdb.33.1366718389490; Tue, 23 Apr 2013 04:59:49 -0700 (PDT) Received: by 10.220.56.134 with HTTP; Tue, 23 Apr 2013 04:59:49 -0700 (PDT) In-Reply-To: References: Date: Tue, 23 Apr 2013 07:59:49 -0400 Message-ID: Subject: Re: timestamp order From: Keith Turner To: user@accumulo.apache.org Content-Type: multipart/alternative; boundary=20cf307f38061d277d04db05ec34 X-Gm-Message-State: ALoCoQlNuwcw/LNNjUKEMDAYBpHCXZRrRRSMoWycfpgIMszqhqJy8j2ePAONSnQniD2meiggcr3+ X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f38061d277d04db05ec34 Content-Type: text/plain; charset=ISO-8859-1 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. >>> >> >> > --20cf307f38061d277d04db05ec34 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Mon, Apr 22, 2013 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, 20= 13 at 2:48 PM, Billie Rinaldi <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.



--20cf307f38061d277d04db05ec34--