diff --git a/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/monitor/sampling/CruiseControlMetricsReporterSampler.java b/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/monitor/sampling/CruiseControlMetricsReporterSampler.java index 953e1820d..584e6e846 100644 --- a/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/monitor/sampling/CruiseControlMetricsReporterSampler.java +++ b/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/monitor/sampling/CruiseControlMetricsReporterSampler.java @@ -185,15 +185,15 @@ public void configure(Map 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."); } } diff --git a/docs/wiki/User Guide/Configurations.md b/docs/wiki/User Guide/Configurations.md index 58abcffaa..51192f20f 100644 --- a/docs/wiki/User Guide/Configurations.md +++ b/docs/wiki/User Guide/Configurations.md @@ -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 |