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 <[email protected]> wrote: > > > > On Mon, Apr 22, 2013 at 8:59 PM, Venkat <[email protected]> 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 <[email protected] >> > wrote: >> >>> You could use a VersioningIterator with maxVersions set to 5. >>> >>> Billie >>> >>> >>> >>> On Mon, Apr 22, 2013 at 11:29 AM, Venkat <[email protected]> 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. >>>> >>> >>> >> >
