cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leslie Viljoen <leslievilj...@gmail.com>
Subject Start key must sort before (or equal to) finish key in your partitioner
Date Mon, 31 May 2010 07:57:47 GMT
Hello!

I am using an OrderPreservingPartitioner and sequential UUID's as
keys. When I use get_range I frequently get an error indicating that
my start key is not before or equal to my finish key, which seems
impossible. The code to request slices looks like this:

sometime = Time.now
a = UUIDTools::UUID.timestamp_create(sometime)
b = UUIDTools::UUID.timestamp_create(sometime + 1)
slice = @cassandra.get_range(:ReportData, :start => a.to_s, :finish => b.to_s)
puts "SORT ERROR!" if a >= b    # this never displays



This is the error I get:

/usr/lib/ruby/gems/1.8/gems/cassandra-0.8.2/lib/../vendor/gen-rb/cassandra.rb:152:in
`recv_get_range_slices': start key must sort before (or equal to)
finish key in your partitioner!
(CassandraThrift::InvalidRequestException)
	from /usr/lib/ruby/gems/1.8/gems/cassandra-0.8.2/lib/../vendor/gen-rb/cassandra.rb:142:in
`get_range_slices'
	from /usr/lib/ruby/gems/1.8/gems/thrift_client-0.4.0/lib/thrift_client.rb:140:in
`send'
	from /usr/lib/ruby/gems/1.8/gems/thrift_client-0.4.0/lib/thrift_client.rb:140:in
`proxy'
	from (eval):1:in `get_range_slices'
	from /usr/lib/ruby/gems/1.8/gems/cassandra-0.8.2/lib/cassandra/protocol.rb:78:in
`_get_range'
	from /usr/lib/ruby/gems/1.8/gems/cassandra-0.8.2/lib/cassandra/cassandra.rb:230:in
`get_range'
	from ./read.rb:29:in `get_range'
	from ./read.rb:62
	from ./read.rb:58:in `loop'
	from ./read.rb:58

Mime
View raw message