diff --git a/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/KafkaCruiseControlUtils.java b/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/KafkaCruiseControlUtils.java index ead9902a7..1e5941970 100644 --- a/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/KafkaCruiseControlUtils.java +++ b/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/KafkaCruiseControlUtils.java @@ -11,6 +11,7 @@ import com.linkedin.kafka.cruisecontrol.config.constants.AnalyzerConfig; import com.linkedin.kafka.cruisecontrol.config.constants.ExecutorConfig; import com.linkedin.kafka.cruisecontrol.config.constants.WebServerConfig; +import com.linkedin.kafka.cruisecontrol.detector.TopicAnomalyDetector; import com.linkedin.kafka.cruisecontrol.exception.PartitionNotExistsException; import com.linkedin.kafka.cruisecontrol.exception.SamplingException; import com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsUtils; @@ -237,6 +238,9 @@ public static void maybeCreateOrUpdateTopic(AdminClient adminClient, NewTopic to * @param adminClient The adminClient to send describeConfigs request. * @param timeout Timeout to describe cluster configs. * @return Cluster configs, or {@code null} if there is a timeout. + * @throws InterruptedException If the thread is interrupted while waiting for the + * AdminClient.describeConfigs response. + * @throws ExecutionException If the AdminClient.describeConfigs response is failed. */ public static Config describeClusterConfigs(AdminClient adminClient, Duration timeout) throws InterruptedException, ExecutionException { @@ -389,6 +393,7 @@ public static CompletionType maybeIncreasePartitionCount(AdminClient adminClient * * @param endOffsets End offsets retrieved by consumer. * @param offsetsForTimes Offsets for times retrieved by consumer. + * @throws SamplingException if there are any partitions that failed to fetch offsets. */ public static void sanityCheckOffsetFetch(Map endOffsets, Map offsetsForTimes) @@ -800,9 +805,10 @@ public static Class setClassConfigIfExists(AbstractConfig configs, Map, V, VT extends Deserializer> Con } /** - * * Returns the right KafkaCruiseControl app, depending on the vertx.enabled property. * * @param config The configurations for Cruise Control. * @param port The port for the REST API. * @param hostname The hostname for the REST API. * @return KafkaCruiseControlApp class depending on the vertx.enabled property. - * @throws ServletException + * @throws ServletException if there is an error during configuration. */ public static KafkaCruiseControlApp getCruiseControlApp(KafkaCruiseControlConfig config, Integer port, String hostname) throws ServletException { if (config.getBoolean(WebServerConfig.VERTX_ENABLED_CONFIG)) {