Replication factor - Consistency Questions
Hello all, There is a lot of material on Replication factor and Consistency level but I am a little confused by what is happening on my setup. (Cassandra 1.1.2). I would appreciate any answers. My Setup: A cluster of 2 nodes evenly balanced. My RF =2, Consistency Level; Write = ANY and Read = 1 I know that my consistency is Weak but since my RF = 2, I thought data would be just duplicated in both the nodes but sometimes, querying does not give me the correct (or gives partial) results. In other times, it gives me the right results Is the Read Repair going on after the first query? But as RF = 2, data is duplicated then why the repair? Note: My query is done a while after the Writes so data should have been in both the nodes. Or is this not the case (flushing not happening etc)? I am thinking of making the Write as 1 and Read as QUORAM so R + W RF (1 + 2 2) to give strong consistency. Will that affect performance a lot (generally speaking)? Thanks in advance Regards Jay
RE: Replication factor - Consistency Questions
Thanks..but write ALL will fail for any downed nodes. I am thinking of QUORAM. From: Jason Tang [mailto:ares.t...@gmail.com] Sent: Tuesday, July 17, 2012 8:24 PM To: user@cassandra.apache.org Subject: Re: Replication factor - Consistency Questions Hi I am starting using Cassandra for not a long time, and also have problems in consistency. Here is some thinking. If you have Write:Any / Read:One, it will have consistency problem, and if you want to repair, check your schema, and check the parameter Read repair chance: http://wiki.apache.org/cassandra/StorageConfiguration And if you want to get consistency result, my suggestion is to have Write:ALL / Read:One, since for Cassandra, write is more faster then read. For performance impact, you need to test your traffic, and if your memory can not cache all your data, or your network is not fast enough, then yes, it will impact to write one more node. BRs 2012/7/18 Jay Parashar jparas...@itscape.com Hello all, There is a lot of material on Replication factor and Consistency level but I am a little confused by what is happening on my setup. (Cassandra 1.1.2). I would appreciate any answers. My Setup: A cluster of 2 nodes evenly balanced. My RF =2, Consistency Level; Write = ANY and Read = 1 I know that my consistency is Weak but since my RF = 2, I thought data would be just duplicated in both the nodes but sometimes, querying does not give me the correct (or gives partial) results. In other times, it gives me the right results Is the Read Repair going on after the first query? But as RF = 2, data is duplicated then why the repair? Note: My query is done a while after the Writes so data should have been in both the nodes. Or is this not the case (flushing not happening etc)? I am thinking of making the Write as 1 and Read as QUORAM so R + W RF (1 + 2 2) to give strong consistency. Will that affect performance a lot (generally speaking)? Thanks in advance Regards Jay
RE: DataStax Opscenter 2.0 question
Firefox version 3.6.10. on Ubuntu 10.10. Let me update it and try. Thanks Nick! Will let you know. -Original Message- From: Nick Bailey [mailto:n...@datastax.com] Sent: Wednesday, April 18, 2012 4:56 PM To: user@cassandra.apache.org Subject: Re: DataStax Opscenter 2.0 question What version of firefox? Someone has reported a similar issue with firefox 3.6? Can you try with chrome or perhaps a more recent version of firefox (assuming you are also on an older version)? On Wed, Apr 18, 2012 at 4:51 PM, Jay Parashar jparas...@itscape.com wrote: I am having trouble in running the OpsCenter. It starts without any error but the GUI stays in the index page and just shows Loading OpsCenter . Firebug shows an error this._onClusterSave.bind is not a function. I have the log turned on DEBUG it shows no error (pasted below). This is the only change I have made to the opscenterd.conf file. Cassandra 1.0.8 included in DSE 2.0 is running fine. Would appreciate any help. Previously, I had no problems configuring/running the OpsCenter 1.4.1. 2012-04-18 23:40:32+0200 [] INFO: twistd 10.2.0 (/usr/bin/python2.6 2.6.6) starting up. 2012-04-18 23:40:32+0200 [] INFO: reactor class: twisted.internet.selectreactor.SelectReactor. 2012-04-18 23:40:32+0200 [] INFO: Logging level set to 'debug' 2012-04-18 23:40:32+0200 [] INFO: OpsCenterdService startService 2012-04-18 23:40:32+0200 [] INFO: OpsCenter version: 2.0 2012-04-18 23:40:32+0200 [] INFO: Compatible agent version: 2.7 2012-04-18 23:40:32+0200 [] DEBUG: Main config options: 2012-04-18 23:40:32+0200 [] DEBUG: agents : [('ssl_certfile', './ssl/opscenter.pem'), ('tmp_dir', './tmp'), ('path_to_installscript', './bin/install_agent.sh'), ('path_to_sudowrap', './bin/sudo_with_pass.py'), ('agent_keyfile', './ssl/agentKeyStore'), ('path_to_deb', 'NONE'), ('ssl_keyfile', './ssl/opscenter.key'), ('agent_certfile', './ssl/agentKeyStore.pem'), ('path_to_rpm', 'NONE')], webserver : [('interface', '127.0.0.1'), ('staticdir', './content'), ('port', ''), ('log_path', './log/http.log')], stat_reporter : [('ssl_key', './ssl/stats.pem')], logging : [('log_path', './log/opscenterd.log'), ('level', 'DEBUG')], authentication : [('passwd_file', './passwds')], 2012-04-18 23:40:32+0200 [] DEBUG: Loading all per-cluster config files 2012-04-18 23:40:32+0200 [] DEBUG: Done loading all per-cluster config files 2012-04-18 23:40:32+0200 [] INFO: No clusters are configured yet, checking to see if a config migration is needed 2012-04-18 23:40:32+0200 [] INFO: Main config does not appear to include a cluster configuration, skipping migration 2012-04-18 23:40:32+0200 [] DEBUG: Loading all per-cluster config files 2012-04-18 23:40:32+0200 [] DEBUG: Done loading all per-cluster config files 2012-04-18 23:40:32+0200 [] INFO: No clusters are configured 2012-04-18 23:40:32+0200 [] INFO: HTTP BASIC authentication disabled 2012-04-18 23:40:32+0200 [] INFO: SSL enabled 2012-04-18 23:40:32+0200 [] INFO: opscenterd.WebServer.OpsCenterdWebServer starting on 2012-04-18 23:40:32+0200 [] INFO: Starting factory opscenterd.WebServer.OpsCenterdWebServer instance at 0x9e35c2c 2012-04-18 23:40:32+0200 [] INFO: morbid.morbid.StompFactory starting on 61619 2012-04-18 23:40:32+0200 [] INFO: Starting factory morbid.morbid.StompFactory instance at 0x9e96a4c 2012-04-18 23:40:32+0200 [] INFO: Configuring agent communication with ssl support enabled. 2012-04-18 23:40:32+0200 [] INFO: morbid.morbid.StompFactory starting on 61620 2012-04-18 23:40:32+0200 [] INFO: OS Version: Linux version 2.6.35-22-generic (buildd@rothera) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 2012-04-18 23:40:32+0200 [] INFO: CPU Info: ['2197.558', '2197.558'] 2012-04-18 23:40:33+0200 [] INFO: Mem Info: 2966MB 2012-04-18 23:40:33+0200 [] INFO: Package Manager: apt 2012-04-18 23:41:32+0200 [] DEBUG: Average opscenterd CPU usage: 0.23%, memory usage: 16 MB 2012-04-18 23:42:32+0200 [] DEBUG: Average opscenterd CPU usage: 0.07%, memory usage: 16 MB Thanks Jay
RE: DataStax Opscenter 2.0 question
Thanks Nick, that was it. With Firefox 11, it works. -Original Message- From: Nick Bailey [mailto:n...@datastax.com] Sent: Wednesday, April 18, 2012 4:56 PM To: user@cassandra.apache.org Subject: Re: DataStax Opscenter 2.0 question What version of firefox? Someone has reported a similar issue with firefox 3.6? Can you try with chrome or perhaps a more recent version of firefox (assuming you are also on an older version)? On Wed, Apr 18, 2012 at 4:51 PM, Jay Parashar jparas...@itscape.com wrote: I am having trouble in running the OpsCenter. It starts without any error but the GUI stays in the index page and just shows Loading OpsCenter . Firebug shows an error this._onClusterSave.bind is not a function. I have the log turned on DEBUG it shows no error (pasted below). This is the only change I have made to the opscenterd.conf file. Cassandra 1.0.8 included in DSE 2.0 is running fine. Would appreciate any help. Previously, I had no problems configuring/running the OpsCenter 1.4.1. 2012-04-18 23:40:32+0200 [] INFO: twistd 10.2.0 (/usr/bin/python2.6 2.6.6) starting up. 2012-04-18 23:40:32+0200 [] INFO: reactor class: twisted.internet.selectreactor.SelectReactor. 2012-04-18 23:40:32+0200 [] INFO: Logging level set to 'debug' 2012-04-18 23:40:32+0200 [] INFO: OpsCenterdService startService 2012-04-18 23:40:32+0200 [] INFO: OpsCenter version: 2.0 2012-04-18 23:40:32+0200 [] INFO: Compatible agent version: 2.7 2012-04-18 23:40:32+0200 [] DEBUG: Main config options: 2012-04-18 23:40:32+0200 [] DEBUG: agents : [('ssl_certfile', './ssl/opscenter.pem'), ('tmp_dir', './tmp'), ('path_to_installscript', './bin/install_agent.sh'), ('path_to_sudowrap', './bin/sudo_with_pass.py'), ('agent_keyfile', './ssl/agentKeyStore'), ('path_to_deb', 'NONE'), ('ssl_keyfile', './ssl/opscenter.key'), ('agent_certfile', './ssl/agentKeyStore.pem'), ('path_to_rpm', 'NONE')], webserver : [('interface', '127.0.0.1'), ('staticdir', './content'), ('port', ''), ('log_path', './log/http.log')], stat_reporter : [('ssl_key', './ssl/stats.pem')], logging : [('log_path', './log/opscenterd.log'), ('level', 'DEBUG')], authentication : [('passwd_file', './passwds')], 2012-04-18 23:40:32+0200 [] DEBUG: Loading all per-cluster config files 2012-04-18 23:40:32+0200 [] DEBUG: Done loading all per-cluster config files 2012-04-18 23:40:32+0200 [] INFO: No clusters are configured yet, checking to see if a config migration is needed 2012-04-18 23:40:32+0200 [] INFO: Main config does not appear to include a cluster configuration, skipping migration 2012-04-18 23:40:32+0200 [] DEBUG: Loading all per-cluster config files 2012-04-18 23:40:32+0200 [] DEBUG: Done loading all per-cluster config files 2012-04-18 23:40:32+0200 [] INFO: No clusters are configured 2012-04-18 23:40:32+0200 [] INFO: HTTP BASIC authentication disabled 2012-04-18 23:40:32+0200 [] INFO: SSL enabled 2012-04-18 23:40:32+0200 [] INFO: opscenterd.WebServer.OpsCenterdWebServer starting on 2012-04-18 23:40:32+0200 [] INFO: Starting factory opscenterd.WebServer.OpsCenterdWebServer instance at 0x9e35c2c 2012-04-18 23:40:32+0200 [] INFO: morbid.morbid.StompFactory starting on 61619 2012-04-18 23:40:32+0200 [] INFO: Starting factory morbid.morbid.StompFactory instance at 0x9e96a4c 2012-04-18 23:40:32+0200 [] INFO: Configuring agent communication with ssl support enabled. 2012-04-18 23:40:32+0200 [] INFO: morbid.morbid.StompFactory starting on 61620 2012-04-18 23:40:32+0200 [] INFO: OS Version: Linux version 2.6.35-22-generic (buildd@rothera) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 2012-04-18 23:40:32+0200 [] INFO: CPU Info: ['2197.558', '2197.558'] 2012-04-18 23:40:33+0200 [] INFO: Mem Info: 2966MB 2012-04-18 23:40:33+0200 [] INFO: Package Manager: apt 2012-04-18 23:41:32+0200 [] DEBUG: Average opscenterd CPU usage: 0.23%, memory usage: 16 MB 2012-04-18 23:42:32+0200 [] DEBUG: Average opscenterd CPU usage: 0.07%, memory usage: 16 MB Thanks Jay
DataStax Opscenter 2.0 question
I am having trouble in running the OpsCenter. It starts without any error but the GUI stays in the index page and just shows Loading OpsCenter.. Firebug shows an error this._onClusterSave.bind is not a function. I have the log turned on DEBUG it shows no error (pasted below). This is the only change I have made to the opscenterd.conf file. Cassandra 1.0.8 included in DSE 2.0 is running fine. Would appreciate any help. Previously, I had no problems configuring/running the OpsCenter 1.4.1. 2012-04-18 23:40:32+0200 [] INFO: twistd 10.2.0 (/usr/bin/python2.6 2.6.6) starting up. 2012-04-18 23:40:32+0200 [] INFO: reactor class: twisted.internet.selectreactor.SelectReactor. 2012-04-18 23:40:32+0200 [] INFO: Logging level set to 'debug' 2012-04-18 23:40:32+0200 [] INFO: OpsCenterdService startService 2012-04-18 23:40:32+0200 [] INFO: OpsCenter version: 2.0 2012-04-18 23:40:32+0200 [] INFO: Compatible agent version: 2.7 2012-04-18 23:40:32+0200 [] DEBUG: Main config options: 2012-04-18 23:40:32+0200 [] DEBUG: agents : [('ssl_certfile', './ssl/opscenter.pem'), ('tmp_dir', './tmp'), ('path_to_installscript', './bin/install_agent.sh'), ('path_to_sudowrap', './bin/sudo_with_pass.py'), ('agent_keyfile', './ssl/agentKeyStore'), ('path_to_deb', 'NONE'), ('ssl_keyfile', './ssl/opscenter.key'), ('agent_certfile', './ssl/agentKeyStore.pem'), ('path_to_rpm', 'NONE')], webserver : [('interface', '127.0.0.1'), ('staticdir', './content'), ('port', ''), ('log_path', './log/http.log')], stat_reporter : [('ssl_key', './ssl/stats.pem')], logging : [('log_path', './log/opscenterd.log'), ('level', 'DEBUG')], authentication : [('passwd_file', './passwds')], 2012-04-18 23:40:32+0200 [] DEBUG: Loading all per-cluster config files 2012-04-18 23:40:32+0200 [] DEBUG: Done loading all per-cluster config files 2012-04-18 23:40:32+0200 [] INFO: No clusters are configured yet, checking to see if a config migration is needed 2012-04-18 23:40:32+0200 [] INFO: Main config does not appear to include a cluster configuration, skipping migration 2012-04-18 23:40:32+0200 [] DEBUG: Loading all per-cluster config files 2012-04-18 23:40:32+0200 [] DEBUG: Done loading all per-cluster config files 2012-04-18 23:40:32+0200 [] INFO: No clusters are configured 2012-04-18 23:40:32+0200 [] INFO: HTTP BASIC authentication disabled 2012-04-18 23:40:32+0200 [] INFO: SSL enabled 2012-04-18 23:40:32+0200 [] INFO: opscenterd.WebServer.OpsCenterdWebServer starting on 2012-04-18 23:40:32+0200 [] INFO: Starting factory opscenterd.WebServer.OpsCenterdWebServer instance at 0x9e35c2c 2012-04-18 23:40:32+0200 [] INFO: morbid.morbid.StompFactory starting on 61619 2012-04-18 23:40:32+0200 [] INFO: Starting factory morbid.morbid.StompFactory instance at 0x9e96a4c 2012-04-18 23:40:32+0200 [] INFO: Configuring agent communication with ssl support enabled. 2012-04-18 23:40:32+0200 [] INFO: morbid.morbid.StompFactory starting on 61620 2012-04-18 23:40:32+0200 [] INFO: OS Version: Linux version 2.6.35-22-generic (buildd@rothera) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 2012-04-18 23:40:32+0200 [] INFO: CPU Info: ['2197.558', '2197.558'] 2012-04-18 23:40:33+0200 [] INFO: Mem Info: 2966MB 2012-04-18 23:40:33+0200 [] INFO: Package Manager: apt 2012-04-18 23:41:32+0200 [] DEBUG: Average opscenterd CPU usage: 0.23%, memory usage: 16 MB 2012-04-18 23:42:32+0200 [] DEBUG: Average opscenterd CPU usage: 0.07%, memory usage: 16 MB Thanks Jay
RE: Initial token - newbie question (version 1.0.8)
Thanks everybody! Appreciate it. From: Watanabe Maki [mailto:watanabe.m...@gmail.com] Sent: Wednesday, April 11, 2012 5:40 PM To: user@cassandra.apache.org Subject: Re: Initial token - newbie question (version 1.0.8) auto_bootstrap parameter has been removed and always enabled since 1.0. maki On 2012/04/12, at 6:10, Paolo Bernardi berna...@gmail.com wrote: I think that setting auto_bootstrap = true or false into cassandra.yaml is enough (if it isn't there already just add it, for example, after initial_token) Paolo On Apr 11, 2012 10:34 PM, Jay Parashar jparas...@itscape.com wrote: Thanks a lot Jeremiah. Also would you be able to tell me where to configure the auto_bootstrap parameter in version 1.0.8? Thanks Jay -Original Message- From: Jeremiah Jordan [mailto:jeremiah.jor...@morningstar.com] Sent: Wednesday, April 11, 2012 3:03 PM To: user@cassandra.apache.org Subject: RE: Initial token - newbie question (version 1.0.8) You have to use nodetool move to change the token after the node has started the first time. The value in the config file is only used on first startup. Unless you were using RF=3 on your 3 node ring, you can't just start with a new token without using nodetool. You have to do move so that the data gets put in the right place. How you would do it with out nodetool: Dangerous, not smart, can easily shoot yourself in the foot and lose your data way, if you were RF = 3: If you used RF=3, then all nodes should have all data, and you can stop all nodes, remove the system keyspace data, and start up the new cluster with the right stuff in the yaml file (blowing away system means this is like starting a brand new cluster). Then re-create all of your keyspaces/column families and they will pick up the already existing data. Though, if you are rf=3, nodetool move shouldn't be moving anything anyway, so you should just do it the right way and use nodetool. From: Jay Parashar [jparas...@itscape.com] Sent: Wednesday, April 11, 2012 1:44 PM To: user@cassandra.apache.org Subject: Initial token - newbie question (version 1.0.8) I created a 3 node ring with the intial_token blank. Of course as expected, Cassandra generated its own tokens on startup (e.g. tokens X, Y and Z) The nodes or course were not properly balanced, so I did the following steps 1) stopped all the 3 nodes 2) assigned initial_tokens (A, B, C) respectively 3) Restarted the nodes What I find if that the node were still using the original tokens (X, Y and Z). Log messages say for node 1 show Using saved token X I could rebalance suing nodetool and now the nodes are using the correct tokens. But the question is, why were the new tokens not read from the Cassandra.yaml file? Without using nodetool, how do I make it get the token from the yaml file? Where is it saved? Another question: I could not find the auto_bootstrap in the yaml file as per the documentation. Where is this param located? Appreciate it. Thanks in advance Jay
Initial token - newbie question (version 1.0.8)
I created a 3 node ring with the intial_token blank. Of course as expected, Cassandra generated its own tokens on startup (e.g. tokens X, Y and Z) The nodes or course were not properly balanced, so I did the following steps 1) stopped all the 3 nodes 2) assigned initial_tokens (A, B, C) respectively 3) Restarted the nodes What I find if that the node were still using the original tokens (X, Y and Z). Log messages say for node 1 show Using saved token X I could rebalance suing nodetool and now the nodes are using the correct tokens. But the question is, why were the new tokens not read from the Cassandra.yaml file? Without using nodetool, how do I make it get the token from the yaml file? Where is it saved? Another question: I could not find the auto_bootstrap in the yaml file as per the documentation. Where is this param located? Appreciate it. Thanks in advance Jay
RE: Initial token - newbie question (version 1.0.8)
Thanks a lot Jeremiah. Also would you be able to tell me where to configure the auto_bootstrap parameter in version 1.0.8? Thanks Jay -Original Message- From: Jeremiah Jordan [mailto:jeremiah.jor...@morningstar.com] Sent: Wednesday, April 11, 2012 3:03 PM To: user@cassandra.apache.org Subject: RE: Initial token - newbie question (version 1.0.8) You have to use nodetool move to change the token after the node has started the first time. The value in the config file is only used on first startup. Unless you were using RF=3 on your 3 node ring, you can't just start with a new token without using nodetool. You have to do move so that the data gets put in the right place. How you would do it with out nodetool: Dangerous, not smart, can easily shoot yourself in the foot and lose your data way, if you were RF = 3: If you used RF=3, then all nodes should have all data, and you can stop all nodes, remove the system keyspace data, and start up the new cluster with the right stuff in the yaml file (blowing away system means this is like starting a brand new cluster). Then re-create all of your keyspaces/column families and they will pick up the already existing data. Though, if you are rf=3, nodetool move shouldn't be moving anything anyway, so you should just do it the right way and use nodetool. From: Jay Parashar [jparas...@itscape.com] Sent: Wednesday, April 11, 2012 1:44 PM To: user@cassandra.apache.org Subject: Initial token - newbie question (version 1.0.8) I created a 3 node ring with the intial_token blank. Of course as expected, Cassandra generated its own tokens on startup (e.g. tokens X, Y and Z) The nodes or course were not properly balanced, so I did the following steps 1) stopped all the 3 nodes 2) assigned initial_tokens (A, B, C) respectively 3) Restarted the nodes What I find if that the node were still using the original tokens (X, Y and Z). Log messages say for node 1 show Using saved token X I could rebalance suing nodetool and now the nodes are using the correct tokens. But the question is, why were the new tokens not read from the Cassandra.yaml file? Without using nodetool, how do I make it get the token from the yaml file? Where is it saved? Another question: I could not find the auto_bootstrap in the yaml file as per the documentation. Where is this param located? Appreciate it. Thanks in advance Jay