cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vicent roca daniel <sap...@gmail.com>
Subject Re: Insert LongType with ruby
Date Tue, 04 Jan 2011 21:24:35 GMT
I don't know.
Looking the table with de cli I see this results:

Using app.insert(:Numers, 'device1-cpu', {Time.now => i.to_s }) :

=> (column=5300944406187227576, value=3, timestamp=1294175880417061)
=> (column=5300944406181604704, value=2, timestamp=1294175880415584)
=> (column=5300944406071978530, value=1, timestamp=1294175880413584)


Using app.insert(:Numers, 'device1-cpu', {Time.stamp => i.to_s }) :

=> (column=1294176156967820, value=3, timestamp=1294176156967851)
=> (column=1294176156966904, value=2, timestamp=1294176156966949)
=> (column=1294176156957286, value=1, timestamp=1294176156965795)

Which I think it makes more sense since this columns names are timestamps.
I'll keep working on this.
Thanks for your help ryan :)



On Tue, Jan 4, 2011 at 10:18 PM, Ryan King <ryan@twitter.com> wrote:

> On Tue, Jan 4, 2011 at 12:50 PM, vicent roca daniel <saptah@gmail.com>
> wrote:
> > I'm getting more consistent results using Time.stamp instead of Time
> > From:
> https://github.com/fauna/cassandra/blob/master/lib/cassandra/long.rb
>
> Yeah, you were probably overwriting values then.
>
> -ryan
>

Mime
View raw message