incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thibaut Britz <thibaut.br...@trendiction.com>
Subject cassandra 0.8.7 + hector 0.8.3: All Quorum reads result in writes?
Date Wed, 11 Apr 2012 15:41:36 GMT
Hi,

I just diagnosted this strange behavior:

When I fetch a rangeslice through hector and set the consistency level to
quorum, according to cfstats (and also to the output files on the hd),
cassandra seems to execute a write request for each read I execute. The
write count in cfstats is increased when I execute the rangeslice function
over the same range again and again (without saving anything at all).

If I set the consitency level to ONE, no writes are executed.

How can I disable this? Why are the records rewritten each time, even
though I don't want them to be rewritten?

Thanks,
Thibaut.


Code:
                                Keyspace ks = getConnection(cluster,
consistencylevel);

RangeSlicesQuery<String, String, V> rangeSlicesQuery =
HFactory.createRangeSlicesQuery(ks, StringSerializer.get(),
StringSerializer.get(), s);

rangeSlicesQuery.setColumnFamily(columnFamily);
rangeSlicesQuery.setColumnNames(column);

rangeSlicesQuery.setKeys(start, end);
rangeSlicesQuery.setRowCount(maxrows);

QueryResult<OrderedRows<String, String, V>> result =
rangeSlicesQuery.execute();
return result.get();

Mime
View raw message