From 65fd95005401950072dce46598661e7d55ca9d3b Mon Sep 17 00:00:00 2001 From: Will Dey Date: Thu, 5 Sep 2024 01:22:31 -0400 Subject: [PATCH] metadata viewer --- .../apache/cassandra/tools/SSTableMetadataViewer.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java index 831901439c..f75c4c76ff 100644 --- a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java +++ b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java @@ -54,6 +54,7 @@ public static void main(String[] args) throws IOException ValidationMetadata validation = (ValidationMetadata) metadata.get(MetadataType.VALIDATION); StatsMetadata stats = (StatsMetadata) metadata.get(MetadataType.STATS); CompactionMetadata compaction = (CompactionMetadata) metadata.get(MetadataType.COMPACTION); + ValidAncestorsMetadata validAncestors = (ValidAncestorsMetadata) metadata.get(MetadataType.VALID_ANCESTORS); out.printf("SSTable: %s%n", descriptor); if (validation != null) @@ -81,7 +82,15 @@ public static void main(String[] args) throws IOException } if (compaction != null) { - out.printf("Ancestors: %s%n", compaction.ancestors.toString()); + out.printf("Ancestors: %s", compaction.ancestors.toString()); + if (validAncestors != null) + { + out.println(" (considered valid)"); + } + else + { + out.println(" (considered invalid)"); + } out.printf("Estimated cardinality: %s%n", compaction.cardinalityEstimator.cardinality()); }