Cassandra and phpcassa migration

I am trying to migrate my old version from cassandra 1.2.8 to cassandra 2.1, I use phpcassa 0.8, when I migrated cassandra everything worked fine except that I could not use:

$columnFamily->get($key);

I can perfectly write and do this:

$columnFamily->execute_cql_query($query);

but if I try to read the data using get (), I get the following error:

Error performing get_slice on 154.65.97.898:9160: exception 'cassandra_UnavailableException' in /var/www-zend/order/library/phpcassa/thrift/Thrift.php:574 

Perhaps some of them may help resolve this error.

thank!

+4
source share
1 answer

I solved the problem:

I just changed the Level constant to ONE and it works, for example:

does not work:

$consistencyLevel = cassandra_ConsistencyLevel::QUORUM;
$columnFamily->get($key, $columnNames, '', '', false, $limit, null, $consistencyLevel);

work:

$consistencyLevel = cassandra_ConsistencyLevel::ONE;
$columnFamily->get($key, $columnNames, '', '', false, $limit, null, $consistencyLevel);

I don’t know why, but casandra does not allow me to do get () with the consistency of LEVEL QUORUM.

Maybe someone can explain this to me.

thank!

+1
source

All Articles