Re: [Consitency on cqlsh command prompt]

2014-12-17 Thread Ryan Svihla
DO you have 2 data centers?
QUORUM is (total_replicas/2)+1

You may want LOCAL_QUORUM

On Tue, Dec 16, 2014 at 11:47 PM, nitin padalia padalia.ni...@gmail.com
wrote:

 Hi,

 When I set Consistency to QUORUM in cqlsh command line. It says
 consistency is set to quorum.

 cqlsh:testdb CONSISTENCY QUORUM ;
 Consistency level set to QUORUM.

 However when I check it back using CONSISTENCY command on the prompt
 it says consistency is 4. However it should be 2 as my replication
 factor for the keyspace is 3.
 cqlsh:testdb CONSISTENCY ;
 Current consistency level is 4.

 Isn't consistency QUORUM calculated by: (replication_factor/2)+1?
 Where replication_factor/2 is rounded down.

 If yes then why consistency is displayed as 4, however it should be 2
 (3/2 = 1.5 = 1)+1 = 2.

 I am using Casssandra version 2.1.2 and cqlsh 5.0.1 and CQL spec 3.2.0


 Thanks! in advance.
 Nitin Padalia



-- 

[image: datastax_logo.png] http://www.datastax.com/

Ryan Svihla

Solution Architect

[image: twitter.png] https://twitter.com/foundev [image: linkedin.png]
http://www.linkedin.com/pub/ryan-svihla/12/621/727/

DataStax is the fastest, most scalable distributed database technology,
delivering Apache Cassandra to the world’s most innovative enterprises.
Datastax is built to be agile, always-on, and predictably scalable to any
size. With more than 500 customers in 45 countries, DataStax is the
database technology and transactional backbone of choice for the worlds
most innovative companies such as Netflix, Adobe, Intuit, and eBay.


Re: [Consitency on cqlsh command prompt]

2014-12-17 Thread Philip Thompson
I believe the problem here is that the consistency level it is showing you
is not the number of nodes that need to respond, but the enum value that
corresponds to QUORUM internally. If you would like, you can file an
improvement request on the Apache Cassandra Jira.

On Wed, Dec 17, 2014 at 12:47 AM, nitin padalia padalia.ni...@gmail.com
wrote:

 Hi,

 When I set Consistency to QUORUM in cqlsh command line. It says
 consistency is set to quorum.

 cqlsh:testdb CONSISTENCY QUORUM ;
 Consistency level set to QUORUM.

 However when I check it back using CONSISTENCY command on the prompt
 it says consistency is 4. However it should be 2 as my replication
 factor for the keyspace is 3.
 cqlsh:testdb CONSISTENCY ;
 Current consistency level is 4.

 Isn't consistency QUORUM calculated by: (replication_factor/2)+1?
 Where replication_factor/2 is rounded down.

 If yes then why consistency is displayed as 4, however it should be 2
 (3/2 = 1.5 = 1)+1 = 2.

 I am using Casssandra version 2.1.2 and cqlsh 5.0.1 and CQL spec 3.2.0


 Thanks! in advance.
 Nitin Padalia



Re: [Consitency on cqlsh command prompt]

2014-12-17 Thread nitin padalia
Thanks! Philip/Ryan,
Ryan I am using single Datacenter.
Philip could you point some link where we could see those enums.
-Nitin
On Dec 17, 2014 7:14 PM, Philip Thompson philip.thomp...@datastax.com
wrote:

 I believe the problem here is that the consistency level it is showing you
 is not the number of nodes that need to respond, but the enum value that
 corresponds to QUORUM internally. If you would like, you can file an
 improvement request on the Apache Cassandra Jira.

 On Wed, Dec 17, 2014 at 12:47 AM, nitin padalia padalia.ni...@gmail.com
 wrote:

 Hi,

 When I set Consistency to QUORUM in cqlsh command line. It says
 consistency is set to quorum.

 cqlsh:testdb CONSISTENCY QUORUM ;
 Consistency level set to QUORUM.

 However when I check it back using CONSISTENCY command on the prompt
 it says consistency is 4. However it should be 2 as my replication
 factor for the keyspace is 3.
 cqlsh:testdb CONSISTENCY ;
 Current consistency level is 4.

 Isn't consistency QUORUM calculated by: (replication_factor/2)+1?
 Where replication_factor/2 is rounded down.

 If yes then why consistency is displayed as 4, however it should be 2
 (3/2 = 1.5 = 1)+1 = 2.

 I am using Casssandra version 2.1.2 and cqlsh 5.0.1 and CQL spec 3.2.0


 Thanks! in advance.
 Nitin Padalia




Re: [Consitency on cqlsh command prompt]

2014-12-17 Thread Laing, Michael
http://datastax.github.io/python-driver/api/cassandra.html

On Wed, Dec 17, 2014 at 9:27 AM, nitin padalia padalia.ni...@gmail.com
wrote:

 Thanks! Philip/Ryan,
 Ryan I am using single Datacenter.
 Philip could you point some link where we could see those enums.
 -Nitin
 On Dec 17, 2014 7:14 PM, Philip Thompson philip.thomp...@datastax.com
 wrote:

 I believe the problem here is that the consistency level it is showing
 you is not the number of nodes that need to respond, but the enum value
 that corresponds to QUORUM internally. If you would like, you can file an
 improvement request on the Apache Cassandra Jira.

 On Wed, Dec 17, 2014 at 12:47 AM, nitin padalia padalia.ni...@gmail.com
 wrote:

 Hi,

 When I set Consistency to QUORUM in cqlsh command line. It says
 consistency is set to quorum.

 cqlsh:testdb CONSISTENCY QUORUM ;
 Consistency level set to QUORUM.

 However when I check it back using CONSISTENCY command on the prompt
 it says consistency is 4. However it should be 2 as my replication
 factor for the keyspace is 3.
 cqlsh:testdb CONSISTENCY ;
 Current consistency level is 4.

 Isn't consistency QUORUM calculated by: (replication_factor/2)+1?
 Where replication_factor/2 is rounded down.

 If yes then why consistency is displayed as 4, however it should be 2
 (3/2 = 1.5 = 1)+1 = 2.

 I am using Casssandra version 2.1.2 and cqlsh 5.0.1 and CQL spec 3.2.0


 Thanks! in advance.
 Nitin Padalia




Re: [Consitency on cqlsh command prompt]

2014-12-17 Thread nitin padalia
Thanks! Michael.
On Dec 17, 2014 8:02 PM, Laing, Michael michael.la...@nytimes.com wrote:

 http://datastax.github.io/python-driver/api/cassandra.html

 On Wed, Dec 17, 2014 at 9:27 AM, nitin padalia padalia.ni...@gmail.com
 wrote:

 Thanks! Philip/Ryan,
 Ryan I am using single Datacenter.
 Philip could you point some link where we could see those enums.
 -Nitin
 On Dec 17, 2014 7:14 PM, Philip Thompson philip.thomp...@datastax.com
 wrote:

 I believe the problem here is that the consistency level it is showing
 you is not the number of nodes that need to respond, but the enum value
 that corresponds to QUORUM internally. If you would like, you can file an
 improvement request on the Apache Cassandra Jira.

 On Wed, Dec 17, 2014 at 12:47 AM, nitin padalia padalia.ni...@gmail.com
  wrote:

 Hi,

 When I set Consistency to QUORUM in cqlsh command line. It says
 consistency is set to quorum.

 cqlsh:testdb CONSISTENCY QUORUM ;
 Consistency level set to QUORUM.

 However when I check it back using CONSISTENCY command on the prompt
 it says consistency is 4. However it should be 2 as my replication
 factor for the keyspace is 3.
 cqlsh:testdb CONSISTENCY ;
 Current consistency level is 4.

 Isn't consistency QUORUM calculated by: (replication_factor/2)+1?
 Where replication_factor/2 is rounded down.

 If yes then why consistency is displayed as 4, however it should be 2
 (3/2 = 1.5 = 1)+1 = 2.

 I am using Casssandra version 2.1.2 and cqlsh 5.0.1 and CQL spec 3.2.0


 Thanks! in advance.
 Nitin Padalia




Re: [Consitency on cqlsh command prompt]

2014-12-17 Thread Adam Holmberg
This is something that could easily be improved in cqlsh. I'll get a ticket
open today.

Adam

On Wed, Dec 17, 2014 at 8:38 AM, nitin padalia padalia.ni...@gmail.com
wrote:

 Thanks! Michael.
 On Dec 17, 2014 8:02 PM, Laing, Michael michael.la...@nytimes.com
 wrote:

 http://datastax.github.io/python-driver/api/cassandra.html

 On Wed, Dec 17, 2014 at 9:27 AM, nitin padalia padalia.ni...@gmail.com
 wrote:

 Thanks! Philip/Ryan,
 Ryan I am using single Datacenter.
 Philip could you point some link where we could see those enums.
 -Nitin
 On Dec 17, 2014 7:14 PM, Philip Thompson philip.thomp...@datastax.com
 wrote:

 I believe the problem here is that the consistency level it is showing
 you is not the number of nodes that need to respond, but the enum value
 that corresponds to QUORUM internally. If you would like, you can file an
 improvement request on the Apache Cassandra Jira.

 On Wed, Dec 17, 2014 at 12:47 AM, nitin padalia 
 padalia.ni...@gmail.com wrote:

 Hi,

 When I set Consistency to QUORUM in cqlsh command line. It says
 consistency is set to quorum.

 cqlsh:testdb CONSISTENCY QUORUM ;
 Consistency level set to QUORUM.

 However when I check it back using CONSISTENCY command on the prompt
 it says consistency is 4. However it should be 2 as my replication
 factor for the keyspace is 3.
 cqlsh:testdb CONSISTENCY ;
 Current consistency level is 4.

 Isn't consistency QUORUM calculated by: (replication_factor/2)+1?
 Where replication_factor/2 is rounded down.

 If yes then why consistency is displayed as 4, however it should be 2
 (3/2 = 1.5 = 1)+1 = 2.

 I am using Casssandra version 2.1.2 and cqlsh 5.0.1 and CQL spec 3.2.0


 Thanks! in advance.
 Nitin Padalia