Skip to content

Commit 2e19de1

Browse files
Google APIscopybara-github
authored andcommitted
chore: updated docs and code sturcture for Dataproc metric configuration
Committer: @akshatbhargava123 PiperOrigin-RevId: 477101789
1 parent 7d8a5ab commit 2e19de1

1 file changed

Lines changed: 56 additions & 23 deletions

File tree

google/cloud/dataproc/v1/clusters.proto

Lines changed: 56 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ message ClusterConfig {
285285
// Optional. Metastore configuration.
286286
MetastoreConfig metastore_config = 20 [(google.api.field_behavior) = OPTIONAL];
287287

288-
// Optional. Dataproc metrics configuration.
289-
DataprocMetricConfig dataproc_metric_config = 21 [(google.api.field_behavior) = OPTIONAL];
288+
// Optional. The config for Dataproc metrics.
289+
DataprocMetricConfig dataproc_metric_config = 23 [(google.api.field_behavior) = OPTIONAL];
290290
}
291291

292292
// Dataproc cluster config for a cluster that does not directly control the
@@ -946,45 +946,78 @@ message MetastoreConfig {
946946
}
947947

948948

949-
// Specifies Dataproc OSS Metric.
950-
message Metric {
949+
// Dataproc metric config.
950+
message DataprocMetricConfig {
951+
// A source for the collection of Dataproc OSS metrics (see [available OSS
952+
// metrics]
953+
// (https://cloud.google.com//dataproc/docs/guides/monitoring#available_oss_metrics)).
951954
enum MetricSource {
952-
// Unspecified metric source
955+
// Required unspecified metric source.
953956
METRIC_SOURCE_UNSPECIFIED = 0;
954957

955958
// Default monitoring agent metrics. If this source is enabled,
956-
// Dataproc enables the monitoring agent in Compute Engine, and collects
957-
// default monitoring agent metrics, which are published with an
958-
// agent.googleapis.com prefix.
959+
// Dataproc enables the monitoring agent in Compute Engine,
960+
// and collects default monitoring agent metrics, which are published
961+
// with an `agent.googleapis.com` prefix.
959962
MONITORING_AGENT_DEFAULTS = 1;
960963

961-
// HDFS metric source
964+
// HDFS metric source.
962965
HDFS = 2;
963966

964-
// SPARK metric source
967+
// Spark metric source.
965968
SPARK = 3;
966969

967-
// YARN metric source
970+
// YARN metric source.
968971
YARN = 4;
969972

970-
// Spark History Server metric source
973+
// Spark History Server metric source.
971974
SPARK_HISTORY_SERVER = 5;
972975

973-
// Hiveserver2 metric source
976+
// Hiveserver2 metric source.
974977
HIVESERVER2 = 6;
975978
}
976979

977-
// Required. Specified source of metric collection
978-
MetricSource metric_source = 1 [(google.api.field_behavior) = REQUIRED];
979-
980-
// Optional. The set of available OSS metrics to collect from the metric
981-
// source.
982-
repeated string metric_overrides = 2 [(google.api.field_behavior) = OPTIONAL];
983-
}
980+
// A Dataproc OSS metric.
981+
message Metric {
982+
// Required. Default metrics are collected unless `metricOverrides` are
983+
// specified for the metric source (see [Available OSS metrics]
984+
// (https://cloud.google.com/dataproc/docs/guides/monitoring#available_oss_metrics)
985+
// for more information).
986+
MetricSource metric_source = 1 [(google.api.field_behavior) = REQUIRED];
987+
988+
// Optional. Specify one or more [available OSS metrics]
989+
// (https://cloud.google.com/dataproc/docs/guides/monitoring#available_oss_metrics)
990+
// to collect for the metric course (for the `SPARK` metric source, any
991+
// [Spark metric]
992+
// (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be
993+
// specified).
994+
//
995+
// Provide metrics in the following format:
996+
// <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code>
997+
// Use camelcase as appropriate.
998+
//
999+
// Examples:
1000+
//
1001+
// ```
1002+
// yarn:ResourceManager:QueueMetrics:AppsCompleted
1003+
// spark:driver:DAGScheduler:job.allJobs
1004+
// sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed
1005+
// hiveserver2:JVM:Memory:NonHeapMemoryUsage.used
1006+
// ```
1007+
//
1008+
// Notes:
1009+
//
1010+
// * Only the specified overridden metrics will be collected for the
1011+
// metric source. For example, if one or more `spark:executive` metrics
1012+
// are listed as metric overrides, other `SPARK` metrics will not be
1013+
// collected. The collection of the default metrics for other OSS metric
1014+
// sources is unaffected. For example, if both `SPARK` andd `YARN` metric
1015+
// sources are enabled, and overrides are provided for Spark metrics only,
1016+
// all default YARN metrics will be collected.
1017+
repeated string metric_overrides = 2 [(google.api.field_behavior) = OPTIONAL];
1018+
}
9841019

985-
// Specifies a Dataproc metric config
986-
message DataprocMetricConfig {
987-
// Configuration set of metrics to collect from the cluster
1020+
// Required. Metrics sources to enable.
9881021
repeated Metric metrics = 1 [(google.api.field_behavior) = REQUIRED];
9891022
}
9901023

0 commit comments

Comments
 (0)