CASSANALYTICS-52: Downgrade noisy TokenPartitioner partition/range maps to DEBUG#209
Open
tejaslodayadd wants to merge 2 commits into
Open
Conversation
…ps to DEBUG
The partition map, reverse partition map, and initial-ranges log lines
in TokenPartitioner emit one entry per token; with the default 256
vnodes per node this produces tens of thousands of characters of log
output at INFO on every job startup, drowning out useful messages.
Lower these to DEBUG in both TokenPartitioner implementations
(cassandra-analytics-core bulk writer and cassandra-analytics-common
bulk reader). Also switch the two concatenated info strings in the
common variant to SLF4J placeholder form so the map's toString() is
not built when DEBUG is suppressed.
Scalar summaries ("Number of ranges", "Tasks to run",
"Calculated number of splits") remain at INFO.
Patch by Tejas Lodaya for CASSANALYTICS-52
frankgh
reviewed
May 18, 2026
| LOGGER.info("Number of partitions {}", reversePartitionMap.size()); | ||
| LOGGER.info("Partition map " + partitionMap); | ||
| LOGGER.info("Reverse partition map " + reversePartitionMap); | ||
| LOGGER.debug("Number of partitions {}", reversePartitionMap.size()); |
Contributor
There was a problem hiding this comment.
I have found this information useful when debugging jobs in the past. I do agree that these log messages are not needed in the majority of case. I wonder if there's a better way to control when to log this information.
Contributor
Author
There was a problem hiding this comment.
probably a JavaDoc comment on calculateTokenRangeMap()?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/CASSANALYTICS-52