incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bram van der Waaij <bramat...@gmail.com>
Subject Re: How to get previous / next data?
Date Tue, 15 Jun 2010 15:08:13 GMT
Perfect! Thanks :-)

2010/6/15 Sylvain Lebresne <sylvain@yakaz.com>

> You want to use 'reversed' in SliceRange (and a start with whatever
> you want and a count of 2).
>
> --
> Sylvain
>
> On Tue, Jun 15, 2010 at 12:01 PM, Bram van der Waaij
> <bramattno@gmail.com> wrote:
> > Hello,
> >
> > We want to use cassandra to store and retrieve time related data. Storing
> > the time-value pairs is easy and works perfectly. The problem arrives at
> > retrieving the data. We do not only want to retrieve data from within a
> time
> > range, but also be able to get the previous and/or next data sample from
> a
> > specific point in time.
> >
> > The next in time i can retrieve by giving asking for the range
> > timestamp...maxtime and request for 2 items. Which returns timestamp (if
> > available) and the next timestamp-value.
> >
> > Does anybody know how i can retrieve the previous timestamp? The columns
> are
> > sorted on the key(timestamp), so the previous request/next should not be
> a
> > difficult to perform.
> >
> > Any suggestions are welcome!
> >
> > Thanks,
> >
> > Bram van der Waaij
>

Mime
View raw message