Skip to content

Commit

Permalink
apply PR requests
Browse files Browse the repository at this point in the history
  • Loading branch information
k0b3rIT committed Nov 18, 2024
1 parent a0b081a commit 1b25066
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ public void configure(Map<String, ?> configs) {
_metricConsumer = createMetricConsumer(configs, CONSUMER_CLIENT_ID_PREFIX);
_currentPartitionAssignment = Collections.emptySet();

LOG.info("Waiting for metrics reporter topic [{}] to be available in the target cluster.", _metricReporterTopic);
if (!CruiseControlMetricsUtils.retry(()->!this.isMetricsTopicExists(), metricTopicAssertAttempts)) {
LOG.info("Waiting for metrics reporter topic [{}] to be available in the Kafka cluster.", _metricReporterTopic);
if (!CruiseControlMetricsUtils.retry(()->!this.isMetricsTopicExists(), 5, 1, metricTopicAssertAttempts)) {
throw new IllegalStateException("Cruise Control cannot find the metrics reporter topic that matches [" + _metricReporterTopic
+ "] in the target cluster.");
+ "] in the Kafka cluster.");
}

if (refreshPartitionAssignment()) {
throw new IllegalStateException("Cruise Control cannot find partitions for the metrics reporter that topic matches ["
+ _metricReporterTopic + "] in the target cluster.");
+ _metricReporterTopic + "] in the Kafka cluster.");
}
}

Expand Down
12 changes: 6 additions & 6 deletions docs/wiki/User Guide/Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ We are still trying to improve cruise control. And following are some configurat
## Configurations of pluggable classes

### CruiseControlMetricsReporterSampler configurations
| Name | Type | Required? | Default Value | Description |
|------------------------------------------------|---------|-----------|------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| metric.reporter.sampler.bootstrap.servers | String | N | The same as `bootstrap.servers` config from Cruise Control | The Kafka cluster to consume the interested metrics collected by CruiseControlMetricsReporter. |
| metric.reporter.topic | String | N | "__CruiseControlMetrics" | The exact topic name from which the sampler should be consuming the interested metrics from. |
| metric.reporter.sampler.group.id | String | N | 60,000 | The consumer group id to use for the consumers to consume from the Kafka cluster. |
| metric.reporter.sampler.topic.assert.attempts | Integer | N | 5 | Number of attempts while waiting for metrics topic to appear in the Kafka cluster during the startup. (We are using exponential backoff, so too high number can cause infrequent and long backoff between retries) |
| Name | Type | Required? | Default Value | Description |
|------------------------------------------------|---------|-----------|------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| metric.reporter.sampler.bootstrap.servers | String | N | The same as `bootstrap.servers` config from Cruise Control | The Kafka cluster to consume the interested metrics collected by CruiseControlMetricsReporter. |
| metric.reporter.topic | String | N | "__CruiseControlMetrics" | The exact topic name from which the sampler should be consuming the interested metrics from. |
| metric.reporter.sampler.group.id | String | N | 60,000 | The consumer group id to use for the consumers to consume from the Kafka cluster. |
| metric.reporter.sampler.topic.assert.attempts | Integer | N | 5 | Number of attempts while waiting for metrics topic to appear in the Kafka cluster during the startup.|

### PrometheusMetricSampler configurations
| Name | Type | Required? | Default Value | Description |
Expand Down

0 comments on commit 1b25066

Please sign in to comment.