You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "smiklosovic (via GitHub)" <gi...@apache.org> on 2023/07/07 12:44:18 UTC
[GitHub] [cassandra] smiklosovic opened a new pull request, #2472: CASSANDRA-18639 fixed count
smiklosovic opened a new pull request, #2472:
URL: https://github.com/apache/cassandra/pull/2472
Thanks for sending a pull request! Here are some tips if you're new here:
* Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
* Be sure to keep the PR description updated to reflect all changes.
* Write your PR title to summarize what this PR proposes.
* If possible, provide a concise example to reproduce the issue for a faster review.
* Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
* If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
Commit messages should follow the following format:
```
<One sentence description, usually Jira title or CHANGES.txt summary>
<Optional lengthier description (context on patch)>
patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>
```
The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
--
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
[GitHub] [cassandra] smiklosovic closed pull request #2472: CASSANDRA-18639 removed count - ninja
Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic closed pull request #2472: CASSANDRA-18639 removed count - ninja
URL: https://github.com/apache/cassandra/pull/2472
--
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
[GitHub] [cassandra] driftx commented on a diff in pull request #2472: CASSANDRA-18639 fixed count
Posted by "driftx (via GitHub)" <gi...@apache.org>.
driftx commented on code in PR #2472:
URL: https://github.com/apache/cassandra/pull/2472#discussion_r1255774263
##########
src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java:
##########
@@ -323,19 +321,7 @@ 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;
-
- try (KeyIterator iter = sstable.keyIterator())
- {
- while (iter.hasNext())
- {
- iter.next();
- count += 1;
- }
- }
+ long count = compaction.cardinalityEstimator.cardinality();
Review Comment:
We should probably indicate this is an estimate when we print it.
--
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
[GitHub] [cassandra] driftx commented on a diff in pull request #2472: CASSANDRA-18639 fixed count
Posted by "driftx (via GitHub)" <gi...@apache.org>.
driftx commented on code in PR #2472:
URL: https://github.com/apache/cassandra/pull/2472#discussion_r1255774999
##########
src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java:
##########
@@ -323,19 +321,7 @@ 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;
-
- try (KeyIterator iter = sstable.keyIterator())
- {
- while (iter.hasNext())
- {
- iter.next();
- count += 1;
- }
- }
+ long count = compaction.cardinalityEstimator.cardinality();
Review Comment:
And we're printing it twice, we already have 'estimated cardinality'...
--
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