Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 20335 invoked from network); 23 Mar 2010 00:02:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Mar 2010 00:02:53 -0000 Received: (qmail 44120 invoked by uid 500); 23 Mar 2010 00:02:53 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 44078 invoked by uid 500); 23 Mar 2010 00:02:53 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 44070 invoked by uid 500); 23 Mar 2010 00:02:53 -0000 Delivered-To: apmail-incubator-cassandra-user@incubator.apache.org Received: (qmail 44067 invoked by uid 99); 23 Mar 2010 00:02:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 00:02:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of patricioe@gmail.com designates 209.85.222.204 as permitted sender) Received: from [209.85.222.204] (HELO mail-pz0-f204.google.com) (209.85.222.204) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 00:02:43 +0000 Received: by pzk42 with SMTP id 42so2558200pzk.32 for ; Mon, 22 Mar 2010 17:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=k9RuN43ehz7/N4yOe5Nle/Wr/g9t/7N2OOg3HsjqrTE=; b=nIPi0BLJlGJnXZ/TI6ZgOwtg/LpkOTy32ellEP2dYsax1XvRg5q0qaxZyFNhABrU6d VQBAQD1r9hbqPjtJ3DADJLOfAM+7SQiqYhd7TozttrjLwOVGUD8XtqKISRSNISlaD6h4 qIGi+uhIF3y4du+6zdJQv3LyDEYeZVD5j4irg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MhfpVAmmHPaqIgs3NYe8yaJQM6wTNbP9iefS1EA5FUTNgLys8CG0HZzaswQsBgqIjb SHfEjBK+wW/nrDuwflJz4CPKqyUAlKRkykJhrzvAN9mal0PkqW7sE2DP149U+0A9eJus YZtj62Sa5TaE75+2WxtTf3JjrB9XBHAuNbH2E= MIME-Version: 1.0 Received: by 10.142.67.33 with SMTP id p33mr1900169wfa.231.1269302541174; Mon, 22 Mar 2010 17:02:21 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Mar 2010 17:02:21 -0700 Message-ID: <4ab7f8471003221702r442f4114oaef5fc4374daacb0@mail.gmail.com> Subject: Re: Consistency Level of CLI From: =?ISO-8859-1?Q?Patricio_Echag=FCe?= To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=001636e0a7d41447ff04826c8735 X-Virus-Checked: Checked by ClamAV on apache.org --001636e0a7d41447ff04826c8735 Content-Type: text/plain; charset=ISO-8859-1 Hi all, is there any documentation for: ConsistencyLevel.DCQUORUM and ConsistencyLevel.DCQUORUMSYNC ? DC = Data Center ? Thanks On Thu, Feb 25, 2010 at 12:12 PM, Masood Mortazavi < masoodmortazavi@gmail.com> wrote: > From the code, it appears that for "get" the default is ONE. > Column column = thriftClient_.get(tableName, key, path, > ConsistencyLevel.ONE).column > - m. > > > On Thu, Feb 25, 2010 at 11:08 AM, Masood Mortazavi < > masoodmortazavi@gmail.com> wrote: > >> >> >> What is the write and read consistency level for the CLI tool >> "cassandra-cli" ? >> >> Do the "set" and "get" commands in the "cli" allow the Consistency Level >> to be specified for a given "set" or "get"? >> >> Is there a current specification of CLI anywhere on the wiki? >> >> ( How are JIRA's related to the CLI tagged in the JIRA system assuming >> they are "tagged" separately? In other words, is there an identifier for >> them? ) >> >> Regards, >> m. >> >> ========================== >> The Cassandra "API" describes write and read consistency levels as >> follows: >> http://wiki.apache.org/cassandra/API >> Write >> >> *Level* >> >> *Behavior* >> >> ZERO >> >> Ensure nothing. A write happens asynchronously in background >> >> ANY >> >> (Coming in 0.6) Ensure that the write has been written to at least 1 node, >> including hinted recipients. >> >> ONE >> >> Ensure that the write has been written to at least 1 node's commit log and >> memory table before responding to the client. >> >> QUORUM >> >> Ensure that the write has been written to / 2 + 1nodes before responding to the client. >> >> ALL >> >> Ensure that the write is written to all nodes before >> responding to the client. Any unresponsive nodes will fail the operation. >> >> Read >> >> *Level* >> >> *Behavior* >> >> ZERO >> >> Not supported, because it doesn't make sense. >> >> ANY >> >> Not supported. You probably want ONE instead. >> >> ONE >> >> Will return the record returned by the first node to respond. A >> consistency check is always done in a background thread to fix any >> consistency issues when ConsistencyLevel.ONE is used. This means >> subsequent calls will have correct data even if the initial read gets an >> older value. (This is called read repair.) >> >> QUORUM >> >> Will query all storage nodes and return the record with the most recent >> timestamp once it has at least a majority of replicas reported. Again, the >> remaining replicas will be checked in the background. >> >> ALL >> >> Will query all storage nodes and return the record with the most recent >> timestamp once all nodes have replied. Any unresponsive nodes will fail the >> operatio >> >> > -- Patricio.- --001636e0a7d41447ff04826c8735 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all, is there any documentation for:

=A0ConsistencyLevel.DCQUORUM= =A0 and=A0 ConsistencyLevel.DCQUORUMSYNC ?

DC =3D Data Center ?
=
Thanks

On Thu, Feb 25, 2010 at 12:12 = PM, Masood Mortazavi <masoodmortazavi@gmail.com> wrote:
From the code, it= appears that for "get" the default is ONE.
=A0 Column column = =3D thriftClient_.get(tableName, key, path, ConsistencyLevel.ONE).column - m.

On Thu, Feb 25, 2010 at 11:08 AM, Masood Morta= zavi <masoodmortazavi@gmail.com> wrote:


What is t= he write and read consistency level for the CLI tool "cassandra-cli&qu= ot; ?

Do the "set" and "get" commands in the "cli&qu= ot; allow the Consistency Level to be specified for a given "set"= or "get"?

Is there a current specification of CLI anywhere on the wiki?

( = How are JIRA's related to the CLI tagged in the JIRA system assuming th= ey are "tagged" separately? In other words, is there an identifie= r for them? )

Regards,
m.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
The Cassandra "API" describes w= rite and read consistency levels as follows:
http://wiki.apache.org/cassandra/AP= I

Write

Level

Behavior

ZERO

Ensure nothing. A write happens asynchronously in background

<= /td>

ANY

(Coming in 0.6) Ensure that the write has been written to at least= 1 node, including hinted recipients.

ONE

Ensure that the write has been written to at least 1 node's co= mmit log and memory table before responding to the client.

QUORUM

Ensure that the write has been written to <ReplicationFacto= r>=A0/=A02=A0+=A01 nodes before responding to the client.

ALL

Ensure that the write is written to all <ReplicationFactor&= gt; nodes before responding to the client. Any unresponsive nodes wil= l fail the operation.

Read

Level

Behavior

ZERO

Not supported, because it doesn't make sense.

ANY

Not supported. You probably want ONE instead.

ONE

Will return the record returned by the first node to respond. A consistency check is always done in a background thread to fix any consistency issues when ConsistencyLevel.ONE is used. This means subsequent ca= lls will have correct data even if the initial read gets an older value. (= This is called read=A0repair.)

QUORUM

Will query all storage nodes and return the record with the most recent timestamp once it has at least a majority of replicas reported. Again, the remaining replicas will be checked in the background.

ALL

Will query all storage nodes and return the record with the most recent timestamp once all nodes have replied. Any unresponsive nodes will fail the operatio






--
Patricio.-<= br> --001636e0a7d41447ff04826c8735--