You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "bschoening (via GitHub)" <gi...@apache.org> on 2023/07/05 23:21:21 UTC
[GitHub] [cassandra] bschoening commented on a diff in pull request #2466: CASSANDRA-18639: sstablemetadata additions
bschoening commented on code in PR #2466:
URL: https://github.com/apache/cassandra/pull/2466#discussion_r1253747703
##########
src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java:
##########
@@ -321,6 +323,21 @@ private void printSStableMetadata(File file, boolean scan) throws IOException
CompactionMetadata compaction = statsComponent.compactionMetadata();
SerializationHeader.Component header = statsComponent.serializationHeader();
Class<? extends ICompressor> compressorClass = null;
+
+ TableMetadata metadata = Util.metadataFromSSTable(descriptor);
+ SSTableReader sstable = SSTableReader.openNoValidation(null, descriptor, TableMetadataRef.forOfflineTools(metadata));
+ int count = 0;
+ KeyIterator iter = sstable.keyIterator();
+ while (iter.hasNext())
Review Comment:
Consider using:
count = IteratorUtils.size(iterator)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org