Migrating cassandra and phpcassa

111 Views Asked by At

i'm 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, exept that i was not able to use:

$columnFamily->get($key);

I can perfectly write and do that:

$columnFamily->execute_cql_query($query);

but if i try to read data using get() i receive 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 

Maybe somebothy can help'me to solve this error.

thanks!

1

There are 1 best solutions below

0
Miton Leon On BEST ANSWER

I resolved the problem:

I just changed the consistencyLevel to ONE and it's work, example:

doesn't 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 don't let me make get() with consistencyLevel QUORUM.

Maybe somebody can explain me that.

thanks!