Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compaction_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_data_size(self):
node1.flush()

table_name = 'standard1'
output = node1.nodetool('tablestats').stdout
output = node1.nodetool('tablestats -r').stdout
if output.find(table_name) != -1:
output = output[output.find(table_name):]
output = output[output.find("Space used (live)"):]
Expand All @@ -92,7 +92,7 @@ def test_data_size(self):
node1.compact()
node1.wait_for_compactions()

output = node1.nodetool('tablestats').stdout
output = node1.nodetool('tablestats -r').stdout
if output.find(table_name) != -1:
output = output[output.find(table_name):]
output = output[output.find("Space used (live)"):]
Expand Down Expand Up @@ -136,7 +136,7 @@ def test_bloomfilter_size(self, strategy):
node1.wait_for_compactions()

table_name = 'standard1'
output = node1.nodetool('tablestats').stdout
output = node1.nodetool('tablestats -r').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())
Expand Down Expand Up @@ -595,7 +595,7 @@ def skip_if_not_supported(self, strategy):
pytest.skip('DateTieredCompactionStrategy is not supported in Cassandra 5.0 and later')

def grep_sstables_in_each_level(node, table_name):
output = node.nodetool('tablestats').stdout
output = node.nodetool('tablestats -r').stdout
output = output[output.find(table_name):]
output = output[output.find("SSTables in each level"):]
return output[output.find(":") + 1:output.find("\n")].strip()
Expand Down
2 changes: 1 addition & 1 deletion dtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def data_size(node, ks, cf):
@return: data size in bytes
"""
hack_legacy_parsing(node)
tablestats = node.nodetool("tablestats {}.{}".format(ks,cf))[0]
tablestats = node.nodetool("tablestats -r {}.{}".format(ks,cf))[0]
regex = re.compile(r'[\t]')
stats_lines = [regex.sub("", s) for s in tablestats.split('\n')
if regex.sub("", s).startswith('Space used (total)')]
Expand Down