This is an automated email from the ASF dual-hosted git repository.
smiklosovic pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push:
new a290bc16 alignement with CASSANDRA-18959
a290bc16 is described below
commit a290bc16a101f3320b87207b8f48cefbcf5cf5e2
Author: Stefan Miklosovic <[email protected]>
AuthorDate: Fri Oct 27 09:46:14 2023 +0200
alignement with CASSANDRA-18959
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18959
---
compaction_test.py | 8 ++++----
cqlsh_tests/test_cqlsh.py | 7 +++++--
dtest.py | 14 +++++++-------
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/compaction_test.py b/compaction_test.py
index c5d90560..f2580a1e 100644
--- a/compaction_test.py
+++ b/compaction_test.py
@@ -79,7 +79,7 @@ class TestCompaction(Tester):
node1.flush()
table_name = 'standard1'
- output = node1.nodetool('cfstats').stdout
+ output = node1.nodetool('tablestats').stdout
if output.find(table_name) != -1:
output = output[output.find(table_name):]
output = output[output.find("Space used (live)"):]
@@ -92,7 +92,7 @@ class TestCompaction(Tester):
node1.compact()
node1.wait_for_compactions()
- output = node1.nodetool('cfstats').stdout
+ output = node1.nodetool('tablestats').stdout
if output.find(table_name) != -1:
output = output[output.find(table_name):]
output = output[output.find("Space used (live)"):]
@@ -136,7 +136,7 @@ class TestCompaction(Tester):
node1.wait_for_compactions()
table_name = 'standard1'
- output = node1.nodetool('cfstats').stdout
+ output = node1.nodetool('tablestats').stdout
output = output[output.find(table_name):]
output = output[output.find("Bloom filter space used"):]
bfSize = int(output[output.find(":") + 1:output.find("\n")].strip())
@@ -595,7 +595,7 @@ class TestCompaction(Tester):
pytest.skip(msg='DateTieredCompactionStrategy is not supported in
Cassandra 5.0 and later')
def grep_sstables_in_each_level(node, table_name):
- output = node.nodetool('cfstats').stdout
+ output = node.nodetool('tablestats').stdout
output = output[output.find(table_name):]
output = output[output.find("SSTables in each level"):]
return output[output.find(":") + 1:output.find("\n")].strip()
diff --git a/cqlsh_tests/test_cqlsh.py b/cqlsh_tests/test_cqlsh.py
index 72f56af2..cc48644b 100644
--- a/cqlsh_tests/test_cqlsh.py
+++ b/cqlsh_tests/test_cqlsh.py
@@ -2148,10 +2148,13 @@ Tracing session:""")
r'.*Invalid or unsupported protocol version \(4\).*',
)
self.cluster.populate(1)
- self.cluster.set_configuration_options({
'native_transport_max_negotiable_protocol_version': str(3)})
+ node1, = self.cluster.nodelist()
+
+ if node1.get_cassandra_version() < '5.0':
+ self.cluster.set_configuration_options({
'native_transport_max_negotiable_protocol_version': str(3)})
+
self.cluster.start()
- node1, = self.cluster.nodelist()
stdout, stderr = self.run_cqlsh(node1, cmds='USE system',
cqlsh_options=['--tty'])
# yaml property is deprecated from 4.0 and has no effect
if node1.get_cassandra_version() < '4.0':
diff --git a/dtest.py b/dtest.py
index c6a6f6b4..6d753d36 100644
--- a/dtest.py
+++ b/dtest.py
@@ -407,8 +407,8 @@ def make_auth(user, password):
def data_size(node, ks, cf):
"""
Return the size in bytes for given table in a node.
- This gets the size from nodetool cfstats output.
- This might brake if the format of nodetool cfstats change
+ This gets the size from nodetool tablestats output.
+ This might brake if the format of nodetool tablestats change
as it is looking for specific text "Space used (total)" in output.
@param node: Node in which table size to be checked for
@param ks: Keyspace name for the table
@@ -416,20 +416,20 @@ def data_size(node, ks, cf):
@return: data size in bytes
"""
hack_legacy_parsing(node)
- cfstats = node.nodetool("cfstats {}.{}".format(ks,cf))[0]
+ tablestats = node.nodetool("tablestats {}.{}".format(ks,cf))[0]
regex = re.compile(r'[\t]')
- stats_lines = [regex.sub("", s) for s in cfstats.split('\n')
+ stats_lines = [regex.sub("", s) for s in tablestats.split('\n')
if regex.sub("", s).startswith('Space used (total)')]
if not len(stats_lines) == 1:
- msg = ('Expected output from `nodetool cfstats` to contain exactly 1 '
- 'line starting with "Space used (total)". Found:\n') + cfstats
+ msg = ('Expected output from `nodetool tablestats` to contain exactly
1 '
+ 'line starting with "Space used (total)". Found:\n') +
tablestats
raise RuntimeError(msg)
space_used_line = stats_lines[0].split()
if len(space_used_line) == 4:
return float(space_used_line[3])
else:
- msg = ('Expected format for `Space used (total)` in nodetool cfstats
is `Space used (total): <number>`.'
+ msg = ('Expected format for `Space used (total)` in nodetool
tablestats is `Space used (total): <number>`.'
'Found:\n') + stats_lines[0]
raise RuntimeError(msg)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]