Reference documentation and code samples for the Google Cloud Dataproc V1 Client class Metric.
A Dataproc custom metric.
Generated from protobuf message google.cloud.dataproc.v1.DataprocMetricConfig.Metric
Namespace
Google \ Cloud \ Dataproc \ V1 \ DataprocMetricConfig
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ metric_source
int
Required. A standard set of metrics is collected unless metricOverrides are specified for the metric source (see Custom metrics for more information).
↳ metric_overrides
array
Optional. Specify one or more Custom metrics to collect for the metric course (for the SPARK metric source (any Spark metric can be specified). Provide metrics in the following format: METRIC_SOURCE:INSTANCE:GROUP:METRIC Use camelcase as appropriate. Examples: yarn:ResourceManager:QueueMetrics:AppsCompleted spark:driver:DAGScheduler:job.allJobs sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed hiveserver2:JVM:Memory:NonHeapMemoryUsage.used Notes: * Only the specified overridden metrics are collected for the metric source. For example, if one or more spark:executive metrics are listed as metric overrides, other SPARK metrics are not collected. The collection of the metrics for other enabled custom metric sources is unaffected. For example, if both SPARK andd YARN metric sources are enabled, and overrides are provided for Spark metrics only, all YARN metrics are collected.
getMetricSource
Required. A standard set of metrics is collected unless metricOverrides
are specified for the metric source (see Custom metrics
for more information).
Returns
Type
Description
int
setMetricSource
Required. A standard set of metrics is collected unless metricOverrides
are specified for the metric source (see Custom metrics
for more information).
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getMetricOverrides
Optional. Specify one or more Custom metrics
to collect for the metric course (for the SPARK metric source (any
Spark metric can be
specified).
Provide metrics in the following format:
METRIC_SOURCE:INSTANCE:GROUP:METRIC
Use camelcase as appropriate.
Examples:
Only the specified overridden metrics are collected for the
metric source. For example, if one or more spark:executive metrics
are listed as metric overrides, other SPARK metrics are not
collected. The collection of the metrics for other enabled custom
metric sources is unaffected. For example, if both SPARK andd YARN
metric sources are enabled, and overrides are provided for Spark
metrics only, all YARN metrics are collected.
Only the specified overridden metrics are collected for the
metric source. For example, if one or more spark:executive metrics
are listed as metric overrides, other SPARK metrics are not
collected. The collection of the metrics for other enabled custom
metric sources is unaffected. For example, if both SPARK andd YARN
metric sources are enabled, and overrides are provided for Spark
metrics only, all YARN metrics are collected.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dataproc V1 Client - Class Metric (3.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.14.0 (latest)](/php/docs/reference/cloud-dataproc/latest/V1.DataprocMetricConfig.Metric)\n- [3.13.4](/php/docs/reference/cloud-dataproc/3.13.4/V1.DataprocMetricConfig.Metric)\n- [3.12.0](/php/docs/reference/cloud-dataproc/3.12.0/V1.DataprocMetricConfig.Metric)\n- [3.11.0](/php/docs/reference/cloud-dataproc/3.11.0/V1.DataprocMetricConfig.Metric)\n- [3.10.1](/php/docs/reference/cloud-dataproc/3.10.1/V1.DataprocMetricConfig.Metric)\n- [3.9.0](/php/docs/reference/cloud-dataproc/3.9.0/V1.DataprocMetricConfig.Metric)\n- [3.8.1](/php/docs/reference/cloud-dataproc/3.8.1/V1.DataprocMetricConfig.Metric)\n- [3.7.1](/php/docs/reference/cloud-dataproc/3.7.1/V1.DataprocMetricConfig.Metric)\n- [3.6.1](/php/docs/reference/cloud-dataproc/3.6.1/V1.DataprocMetricConfig.Metric)\n- [3.5.1](/php/docs/reference/cloud-dataproc/3.5.1/V1.DataprocMetricConfig.Metric)\n- [3.4.0](/php/docs/reference/cloud-dataproc/3.4.0/V1.DataprocMetricConfig.Metric)\n- [3.3.0](/php/docs/reference/cloud-dataproc/3.3.0/V1.DataprocMetricConfig.Metric)\n- [3.2.2](/php/docs/reference/cloud-dataproc/3.2.2/V1.DataprocMetricConfig.Metric)\n- [2.6.1](/php/docs/reference/cloud-dataproc/2.6.1/V1.DataprocMetricConfig.Metric)\n- [2.5.0](/php/docs/reference/cloud-dataproc/2.5.0/V1.DataprocMetricConfig.Metric)\n- [2.3.0](/php/docs/reference/cloud-dataproc/2.3.0/V1.DataprocMetricConfig.Metric)\n- [2.2.3](/php/docs/reference/cloud-dataproc/2.2.3/V1.DataprocMetricConfig.Metric)\n- [2.1.0](/php/docs/reference/cloud-dataproc/2.1.0/V1.DataprocMetricConfig.Metric)\n- [2.0.0](/php/docs/reference/cloud-dataproc/2.0.0/V1.DataprocMetricConfig.Metric) \nReference documentation and code samples for the Google Cloud Dataproc V1 Client class Metric.\n\nA Dataproc custom metric.\n\nGenerated from protobuf message `google.cloud.dataproc.v1.DataprocMetricConfig.Metric`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dataproc \\\\ V1 \\\\ DataprocMetricConfig\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMetricSource\n\nRequired. A standard set of metrics is collected unless `metricOverrides`\nare specified for the metric source (see [Custom metrics](https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics)\nfor more information).\n\n### setMetricSource\n\nRequired. A standard set of metrics is collected unless `metricOverrides`\nare specified for the metric source (see [Custom metrics](https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics)\nfor more information).\n\n### getMetricOverrides\n\nOptional. Specify one or more [Custom metrics](https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics)\nto collect for the metric course (for the `SPARK` metric source (any\n[Spark metric](https://spark.apache.org/docs/latest/monitoring.html#metrics) can be\nspecified).\n\nProvide metrics in the following format:\n\u003cvar translate=\"no\"\u003eMETRIC_SOURCE\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eINSTANCE\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eGROUP\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eMETRIC\u003c/var\u003e\nUse camelcase as appropriate.\nExamples: \n\n yarn:ResourceManager:QueueMetrics:AppsCompleted\n spark:driver:DAGScheduler:job.allJobs\n sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed\n hiveserver2:JVM:Memory:NonHeapMemoryUsage.used\n\nNotes:\n\n- Only the specified overridden metrics are collected for the metric source. For example, if one or more `spark:executive` metrics are listed as metric overrides, other `SPARK` metrics are not collected. The collection of the metrics for other enabled custom metric sources is unaffected. For example, if both `SPARK` andd `YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all YARN metrics are collected.\n\n### setMetricOverrides\n\nOptional. Specify one or more [Custom metrics](https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics)\nto collect for the metric course (for the `SPARK` metric source (any\n[Spark metric](https://spark.apache.org/docs/latest/monitoring.html#metrics) can be\nspecified).\n\nProvide metrics in the following format:\n\u003cvar translate=\"no\"\u003eMETRIC_SOURCE\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eINSTANCE\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eGROUP\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eMETRIC\u003c/var\u003e\nUse camelcase as appropriate.\nExamples: \n\n yarn:ResourceManager:QueueMetrics:AppsCompleted\n spark:driver:DAGScheduler:job.allJobs\n sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed\n hiveserver2:JVM:Memory:NonHeapMemoryUsage.used\n\nNotes:\n\n- Only the specified overridden metrics are collected for the metric source. For example, if one or more `spark:executive` metrics are listed as metric overrides, other `SPARK` metrics are not collected. The collection of the metrics for other enabled custom metric sources is unaffected. For example, if both `SPARK` andd `YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all YARN metrics are collected."]]