incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Consistency level All for read operation
Date Wed, 03 Nov 2010 21:34:37 GMT
You are looking at obsolete code.

CHANGES.txt
0.6.3
 * don't reject reads at CL.ALL (CASSANDRA-1152)


On Wed, Nov 3, 2010 at 5:27 PM, Maifi Khan <maifi.khan@gmail.com> wrote:
> Hi
> Inside org.apache.cassandra.thrift,  in CassandraServer.java, it seems
> that read operation for Consistency level  "all" is not supported.
>
> Is this the case?
> Does this mean there is no way to read from all the copy?  if there
> are 3 copies of data, I would like to read all of them.
>
> I gave the code snippet below.
>
>
>
>  protected Map<String, ColumnFamily>
> readColumnFamily(List<ReadCommand> commands, ConsistencyLevel
> consistency_level)
>    throws InvalidRequestException, UnavailableException, TimedOutException
>    {
>        // TODO - Support multiple column families per row, right now
> row only contains 1 column family
>        Map<String, ColumnFamily> columnFamilyKeyMap = new
> HashMap<String,ColumnFamily>();
>
>        if (consistency_level == ConsistencyLevel.ZERO)
>        {
>            throw new InvalidRequestException("Consistency level zero
> may not be applied to read operations");
>        }
>        if (consistency_level == ConsistencyLevel.ALL)
>        {
>            throw new InvalidRequestException("Consistency level all
> is not yet supported on read operations");
>        }
>        if (consistency_level == ConsistencyLevel.ANY)
>        {
>            throw new InvalidRequestException("Consistency level any
> may not be applied to read operations");
>        }
>
>
>
> thanks
> Maifi
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Mime
View raw message