After configuring DMA to use external Cassandra Cluster, it is observed that the keyspaces are created with unexpected replication factor and consistency levels:
The command 'nodetool status' shows that there are 4 nodes - 2 in dc1 and 2 in dc2. All nodes are UN.
The contents of the db.xml file used is:
<?xml version="1.0"?>
<DataBases xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns=http://www.skyline.be/config/db>
<DataBase active="true" type="Elasticsearch" search="true">
<DBServer>localhost</DBServer>
<UID/>
<PWD/>
</DataBase>
<DataBase active="true" local="true" type="CassandraCluster" consistencyLevel="LocalQuorum">
<DBServer>192.168.1.112,192.168.1.113,192.168.2.112,192.168.2.113</DBServer>
<DB>sldmadb</DB>
<UID></UID>
<PWD></PWD>
</DataBase>
</DataBases>
- We were expecting to see a consistency level of LocalQuorum as set in db.xml. However it is set to ONE. Is this a bug?
- We are not sure what the replication factor would be set given the Cassandra setup. Can some advice around the policy that has been implemented in code that determines how replication factors are set when DataMiner is configuring Cassandra keyspaces? Based upon documentation at Data replication and consistency configuration | DataMiner Docs it appears that this cluster is considered '3 or less nodes', but there are 4 nodes.
Hi Bing,
Some suggestions to check:
1: Running CONSISTENCY in cqlsh will display how many nodes in the replica must respond for the CQLSH session, rather than the consistency level set in Dataminer.
2: You have two nodes in each datacenter, so a replication factor of three is not possible. It is expected that the replication factor that has been set is 1.
Thanks Jason for your inputs. Some additional text to benefit future readers:
(1) What is now clear after discussing with yourself and Michiel is that consistency level is not a setting on the Cassandra cluster but a value that is sent with each read and write query. For DataMiner this value is what is in the db.xml file.
(2) What can be misleading in the documentation link above is that it refers to ‘Cassandra Cluster’ when what it really means is ‘DataCentre’. A test with a Cassandra Cluster of 6 nodes (2 nodes in dc1 and 4 nodes in dc2) resulted in the following strategy and replication setting for keyspace created by DataMiner (which aligns with the logic described in the link):
{‘class’: ‘org.apache.cassandra.locator.NetworkTopologyStrategy’, ‘dc1’: ‘1’, ‘dc2’: ‘3’}