How Cruise Control retrieves metrics
Cruise Control creates metric samples using the retrieved raw metrics from Kafka. The metric samples are used to set up the cluster workload model for the Load Monitor. When deploying Cruise Control in a CDP environment, you can use Cloudera Manager or the default Metrics Reporter of Cruise Control to execute the process of retrieving the metrics.
In Load Monitor, the Metric Fetcher Manager is responsible for coordinating all the sampling tasks: the Metric Sampling Task, the Bootstrap Task, and the Linear Model Training Task.
Each sampling task is carried out by a configured number of Metric Fetcher threads. Each Metric Fetcher thread uses a pluggable Metric Sampler to fetch samples. Each Metric Fetcher is assigned with a few partitions in the cluster to get the samples. The metric samples are organized by the Metric Sample Aggregator that puts each metric sample into a workload snapshot according to the timestamp of a metric sample.
The cluster workload model is the primary output of the Load Monitor. The cluster workload model reflects the current replica assignment of the cluster and provides interfaces to move partitions or replicas. These interfaces are used by the Analyzer to generate optimization solutions.
The Sample Store stores the metric and training samples for future use.
With the metric sampler, you can deploy Cruise Control to various environments and work with the existing metric system.
When you use Cruise Control in the Cloudera environment, you have the option to choose between
Cloudera Manager and Cruise Control Metrics Reporter. When using Cloudera Manager,
HttpMetricsReporter
reports metrics to the Cloudera Manager time-series
database. As a result, the Kafka metrics can be read using Cloudera Manager.
When using the default Metrics Reporter in Cruise Control, raw metrics are produced directly to
a Kafka topic by CruiseControlMetricsReporter
. Then these metrics are fetched by
Cruise Control and metric samples are created and stored back to Kafka. The samples are used as
the building blocks of cluster models.