Skip to content

Commit

Permalink
Fix PartitionSizeAnomalyFinder, to be able to handle custom SELF_HEAL…
Browse files Browse the repository at this point in the history
…ING_PARTITION_SIZE_THRESHOLD_MB values
  • Loading branch information
k0b3rIT committed Oct 24, 2024
1 parent 2b81fb1 commit 195e35e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ public void configure(Map<String, ?> configs) {
String topicExcludedFromCheck = (String) configs.get(TOPIC_EXCLUDED_FROM_PARTITION_SIZE_CHECK);
_topicExcludedFromCheck = Pattern.compile(topicExcludedFromCheck == null ? DEFAULT_TOPIC_EXCLUDED_FROM_PARTITION_SIZE_CHECK
: topicExcludedFromCheck);
Integer partitionSizeThreshold = (Integer) configs.get(SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB_CONFIG);
_partitionSizeThresholdInMb = partitionSizeThreshold == null ? DEFAULT_SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB
: partitionSizeThreshold;
String partitionSizeThresholdStr = (String) configs.get(SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB_CONFIG);
_partitionSizeThresholdInMb = DEFAULT_SELF_HEALING_PARTITION_SIZE_THRESHOLD_MB;
if (partitionSizeThresholdStr != null) {
_partitionSizeThresholdInMb = Integer.parseInt(partitionSizeThresholdStr.trim());
}

String topicPartitionSizeAnomalyClass = (String) configs.get(TOPIC_PARTITION_SIZE_ANOMALY_CLASS_CONFIG);
if (topicPartitionSizeAnomalyClass == null) {
_topicPartitionSizeAnomalyClass = DEFAULT_TOPIC_PARTITION_SIZE_ANOMALY_CLASS;
Expand Down

0 comments on commit 195e35e

Please sign in to comment.