You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Nimbus Lin <ji...@live.com> on 2019/06/15 14:30:43 UTC
How can I check cassandra cluster has a real working function of high
availability?
Dear cassandra's pioneers:
I am a 5 years' newbie, it is until now that I have time to use cassandra. but I cann't check cassandra's high availabily when I stop a seed node or none seed DN as CGE or Greenplum.
Would someone can tell me how to check the cassandra's high availability? even I change the consistency level from one to local_one, the cqlsh's select is always return an error of NoHostAvailable.
By the way, would you like to answer me other two questions:
2nd question: although cassandrfa's consistency is a per-operation setting, isn't there a whole all operations' consistency setting method?
3rd question: how can I can cassandra cluster's running variables as mysql's show global variables? such as hidden variable of auto_bootstrap?
Thank you!
Sincerely
Nimbuslin(Lin JiaXin)
Mobile: 0086 180 5986 1565
Mail: jiaxinlin@live.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org
Re: how to change a write's and a read's consistency level separately
in cqlsh?
Posted by Oleksandr Shulgin <ol...@zalando.de>.
On Sat, Jun 29, 2019 at 6:19 AM Nimbus Lin <ji...@live.com> wrote:
>
> On the 2nd question, would you like to tell me how to change a
> write's and a read's consistency level separately in cqlsh?
>
Not that I know of special syntax for that, but you may add an explicit
"CONSISTENCY <level>" command before every command in your script, if you
like.
Otherwise, how the document's R+W>Replicator to realize to guarantee a
> strong consistency write and read?
>
The most common setup, AFAIK, is to use a replication factor of 3 and set
consistency levels for both Reads and Writes to one of the Quorum levels:
e.g. both LOCAL_QUORUM, or LOCAL_QUORUM for the Reads and EACH_QUORUM for
the Writes, etc. Since the quorum of 3 nodes is 2, you arrive at 2 + 2 >
3, which is what you're asked for.
--
Alex
how to change a write's and a read's consistency level separately in
cqlsh?
Posted by Nimbus Lin <ji...@live.com>.
To Sir Oleksandr :
Thank you very much for your careful teaching, at the begging, I copied system_auth keyspace and tables' sql grammar
and misunderstood the HA function of cassandra, now I know cassandra'ha as hadoop or greenplum.
And I will check the 3rd answer on Jconsole latter.
On the 2nd question, would you like to tell me how to change a write's and a read's consistency level separately in cqlsh?
Otherwise, how the document's R+W>Replicator to realize to guarantee a strong consistency write and read?
Thank you!
Sincerely
Nimbuslin(Lin JiaXin)
Mobile: 0086 180 5986 1565
Mail: jiaxinlin@live.com
________________________________________
From: Oleksandr Shulgin <ol...@zalando.de>
Sent: Monday, June 17, 2019 7:19 AM
To: User
Subject: Re: How can I check cassandra cluster has a real working function of high availability?
On Sat, Jun 15, 2019 at 4:31 PM Nimbus Lin <ji...@live.com>> wrote:
Dear cassandra's pioneers:
I am a 5 years' newbie, it is until now that I have time to use cassandra. but I cann't check cassandra's high availabily when I stop a seed node or none seed DN as CGE or Greenplum.
Would someone can tell me how to check the cassandra's high availability? even I change the consistency level from one to local_one, the cqlsh's select is always return an error of NoHostAvailable.
By the way, would you like to answer me other two questions:
2nd question: although cassandrfa's consistency is a per-operation setting, isn't there a whole all operations' consistency setting method?
3rd question: how can I can cassandra cluster's running variables as mysql's show global variables? such as hidden variable of auto_bootstrap?
Hi,
For the purpose of serving client requests, all nodes are equal -- seed or not. So it shouldn't matter which node you are stopping (or making it unavailable for the rest of the cluster using other means).
In order to test it with cqlsh you should ensure that the replication factors of the keyspace you're testing with is sufficient. Given the NoHostAvailable exception that you are experiencing at consistency level ONE (or LOCAL_ONE), I can guess that you are testing with a keyspace with replication factor 1 and the node which is unavailable happen to be responsible for the particular partition.
For your second question: it depends on a client (or "client driver") you are using. In cqlsh you can set consistency level that will be applied for all subsequent queries using the "CONSISTENCY ..." command. I think that the Java driver does have an option to set the default consistency level, as well as has an option to set consistency level per query. Most likely this is also true for Python and other drivers.
And for the third question: I'm not aware of a CQL or nodetool command that would fulfill the need. Most likely it is possible to learn (and update) most of the configuration parameters using JMX, e.g. with JConsole: https://docs.datastax.com/en/archived/cassandra/3.0/cassandra/operations/opsMonitoring.html#opsMonitoringJconsole
Cheers,
--
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org
Re: How can I check cassandra cluster has a real working function of
high availability?
Posted by Nimbus Lin <ji...@live.com>.
To Sir Oleksandr :
Thank you!
Sincerely
Nimbuslin(Lin JiaXin)
Mobile: 0086 180 5986 1565
Mail: jiaxinlin@live.com
________________________________________
From: Oleksandr Shulgin <ol...@zalando.de>
Sent: Monday, June 17, 2019 7:19 AM
To: User
Subject: Re: How can I check cassandra cluster has a real working function of high availability?
On Sat, Jun 15, 2019 at 4:31 PM Nimbus Lin <ji...@live.com>> wrote:
Dear cassandra's pioneers:
I am a 5 years' newbie, it is until now that I have time to use cassandra. but I cann't check cassandra's high availabily when I stop a seed node or none seed DN as CGE or Greenplum.
Would someone can tell me how to check the cassandra's high availability? even I change the consistency level from one to local_one, the cqlsh's select is always return an error of NoHostAvailable.
By the way, would you like to answer me other two questions:
2nd question: although cassandrfa's consistency is a per-operation setting, isn't there a whole all operations' consistency setting method?
3rd question: how can I can cassandra cluster's running variables as mysql's show global variables? such as hidden variable of auto_bootstrap?
Hi,
For the purpose of serving client requests, all nodes are equal -- seed or not. So it shouldn't matter which node you are stopping (or making it unavailable for the rest of the cluster using other means).
In order to test it with cqlsh you should ensure that the replication factors of the keyspace you're testing with is sufficient. Given the NoHostAvailable exception that you are experiencing at consistency level ONE (or LOCAL_ONE), I can guess that you are testing with a keyspace with replication factor 1 and the node which is unavailable happen to be responsible for the particular partition.
For your second question: it depends on a client (or "client driver") you are using. In cqlsh you can set consistency level that will be applied for all subsequent queries using the "CONSISTENCY ..." command. I think that the Java driver does have an option to set the default consistency level, as well as has an option to set consistency level per query. Most likely this is also true for Python and other drivers.
And for the third question: I'm not aware of a CQL or nodetool command that would fulfill the need. Most likely it is possible to learn (and update) most of the configuration parameters using JMX, e.g. with JConsole: https://docs.datastax.com/en/archived/cassandra/3.0/cassandra/operations/opsMonitoring.html#opsMonitoringJconsole
Cheers,
--
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org
Re: How can I check cassandra cluster has a real working function of
high availability?
Posted by Oleksandr Shulgin <ol...@zalando.de>.
On Sat, Jun 15, 2019 at 4:31 PM Nimbus Lin <ji...@live.com> wrote:
> Dear cassandra's pioneers:
> I am a 5 years' newbie, it is until now that I have time to use
> cassandra. but I cann't check cassandra's high availabily when I stop a
> seed node or none seed DN as CGE or Greenplum.
> Would someone can tell me how to check the cassandra's high
> availability? even I change the consistency level from one to local_one,
> the cqlsh's select is always return an error of NoHostAvailable.
>
> By the way, would you like to answer me other two questions:
> 2nd question: although cassandrfa's consistency is a per-operation
> setting, isn't there a whole all operations' consistency setting method?
> 3rd question: how can I can cassandra cluster's running variables as
> mysql's show global variables? such as hidden variable of auto_bootstrap?
>
Hi,
For the purpose of serving client requests, all nodes are equal -- seed or
not. So it shouldn't matter which node you are stopping (or making it
unavailable for the rest of the cluster using other means).
In order to test it with cqlsh you should ensure that the replication
factors of the keyspace you're testing with is sufficient. Given the
NoHostAvailable exception that you are experiencing at consistency level
ONE (or LOCAL_ONE), I can guess that you are testing with a keyspace with
replication factor 1 and the node which is unavailable happen to be
responsible for the particular partition.
For your second question: it depends on a client (or "client driver") you
are using. In cqlsh you can set consistency level that will be applied for
all subsequent queries using the "CONSISTENCY ..." command. I think that
the Java driver does have an option to set the default consistency level,
as well as has an option to set consistency level per query. Most likely
this is also true for Python and other drivers.
And for the third question: I'm not aware of a CQL or nodetool command that
would fulfill the need. Most likely it is possible to learn (and update)
most of the configuration parameters using JMX, e.g. with JConsole:
https://docs.datastax.com/en/archived/cassandra/3.0/cassandra/operations/opsMonitoring.html#opsMonitoringJconsole
Cheers,
--
Alex