Closed neekhraashish closed 4 years ago
https://docs.datastax.com/en/archived/cassandra/3.x/cassandra/dml/dmlConfigConsistency.html
Within
cqlsh
, use CONSISTENCY, to set the consistency level for all queries in the current cqlsh session. For programming client applications, set the consistency level using an appropriate driver.
CONSISTENCY
is only for the session, to set global consistency you need a Java driver to configure it
https://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/QueryOptions.html#DEFAULT_CONSISTENCY_LEVEL
I am new to Cassandra DB and want to run YCSB benchmarking tool on a single Cassandra container within docker for testing purposes. I am doing this with docker-compose and also come-up with the required yml file which will deploy Cassandra container, create "ycsb" keyspace with required fields then will setup consistency level to LOCAL_ONE, I guess this level is mandatory for single cassandra instance. The official Cassandra image version is "3.11.5".
cassandra-init.sh file contains;
While starting cassandra container I am able to see consistency level changed to LOCAL_ONE.
But when I am attaching to Cassandra container and doing verification is shows:
I also configured it manually:
it sets-up to consistency level to LOCAL_ONE, but once I exit and come out of the container and again attach it, this changes to consistency level ONE.
I am not sure why this is not setting up within container, please any help appreciated.
Thanks