-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PartitionSizeAnomalyFinder, to be able to handle custom SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB value #2212
base: main
Are you sure you want to change the base?
Conversation
ec3db67
to
195e35e
Compare
@mhratson would you please review this? |
_partitionSizeThresholdInMb = DEFAULT_SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB; | ||
if (partitionSizeThresholdStr != null) { | ||
_partitionSizeThresholdInMb = Integer.parseInt(partitionSizeThresholdStr.trim()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_partitionSizeThresholdInMb = DEFAULT_SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB; | |
if (partitionSizeThresholdStr != null) { | |
_partitionSizeThresholdInMb = Integer.parseInt(partitionSizeThresholdStr.trim()); | |
} | |
_partitionSizeThresholdInMb = partitionSizeThreshold == null ? DEFAULT_SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB | |
: Integer.parseInt(partitionSizeThresholdStr.trim()); |
Preserves style, similar to TopicReplicationFactorAnomalyFinder.
Personally I'd also remove the trim()
to maintain the same behaviour as other numerical configs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k0b3rIT please apply the suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I have applied it!
Thanks for raising this, we've ran into the same issue and I was going to raise a PR of my own. Would be great to get this reviewed and merged 🙏 |
…ING_PARTITION_SIZE_THRESHOLD_MB values
195e35e
to
58429e3
Compare
@mhratson would you please review this? |
@CCisGG would you please review this if you have some time? |
Summary
I have fixed the config reader code to parse the integer value
Expected Behavior
Be able to reconfigure the SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB
Actual Behavior
I cant reconfigure the SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB
Steps to Reproduce
topic.anomaly.finder.class=com.linkedin.kafka.cruisecontrol.detector.PartitionSizeAnomalyFinder
self.healing.partition.size.threshold.mb=1024
Known Workarounds
NO
Categorization