kallaspriit / Cassandra-PHP-Client-Library

Cassandra PHP-based client library for managing and querying your Cassandra cluster
http://cassandra-php-client-library.com
103 stars 25 forks source link

Uncaught Exception #5

Closed johnpettit closed 12 years ago

johnpettit commented 12 years ago

Hi

I got the following after copy/pasting the README code into a test.php page.

Users "chuck" and "john": Array ( [chuck] => Array ( [age] => 24 [email] => chuck@norris.com [name] => Chuck Norris )

[john] => Array
    (
        [age] => 34
        [email] => john@smith.com
        [name] => John Smith
    )

)


Fatal error: Uncaught exception 'cassandra_InvalidRequestException' with message 'start key's md5 sorts after end key's md5. this is not allowed; you probably should not specify end key at all, under RandomPartitioner' in /var/www/thrift/Thrift.php:574 Stack trace: #0 /var/www/thrift/packages/cassandra/Cassandra.php(2397): TBase->_read('Cassandra_get_r...', Array, Object(TBinaryProtocolAccelerated)) #1 /var/www/thrift/packages/cassandra/Cassandra.php(520): cassandra_Cassandra_get_range_slices_result->read(Object(TBinaryProtocolAccelerated)) #2 /var/www/thrift/packages/cassandra/Cassandra.php(478): CassandraClient->recv_get_range_slices() #3 [internal function]: CassandraClient->get_range_slices(Object(cassandra_ColumnParent), Object(cassandra_SlicePredicate), Object(cassandra_KeyRange), 1) #4 /var/www/Cassandra.php(968): call_user_func_array(Array, Array) #5 /var/www/Cassandra.php(3609): Cassandra->call('get_range_slice...', Object(cassandra_ColumnParent), Object(cassandra_SlicePredicate), Object(cassandra_KeyRange), 1) in /var/www/Cassandra.php on line 976

I'm pretty new to this, so maybe I'm missing some install or lib?

Regards

JP

johnpettit commented 12 years ago

Additional Info:

I am running a 2 node cluster. If that matters.

JP

kallaspriit commented 12 years ago

The error indicates making a range query on random partitioner, that is only allowed when using order preserving partitioner. Commented this part of the example out and added the notice.