Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
metadata viewer
Browse files Browse the repository at this point in the history
wi11dey committed Sep 5, 2024
1 parent 1acaef6 commit 65fd950
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
Original file line number Diff line number Diff line change
@@ -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());

}

0 comments on commit 65fd950

Please sign in to comment.