简体   繁体   中英

Migrating cassandra and phpcassa

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!

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM