Class DataprocMetricConfig.Metric.Builder (4.44.0)

public static final class DataprocMetricConfig.Metric.Builder extends GeneratedMessageV3.Builder<DataprocMetricConfig.Metric.Builder> implements DataprocMetricConfig.MetricOrBuilder

A Dataproc custom metric.

Protobuf type google.cloud.dataproc.v1.DataprocMetricConfig.Metric

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllMetricOverrides(Iterable<String> values)

public DataprocMetricConfig.Metric.Builder addAllMetricOverrides(Iterable<String> values)

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The metricOverrides to add.

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

addMetricOverrides(String value)

public DataprocMetricConfig.Metric.Builder addMetricOverrides(String value)

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The metricOverrides to add.

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

addMetricOverridesBytes(ByteString value)

public DataprocMetricConfig.Metric.Builder addMetricOverridesBytes(ByteString value)

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the metricOverrides to add.

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DataprocMetricConfig.Metric.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

build()

public DataprocMetricConfig.Metric build()
Returns
Type Description
DataprocMetricConfig.Metric

buildPartial()

public DataprocMetricConfig.Metric buildPartial()
Returns
Type Description
DataprocMetricConfig.Metric

clear()

public DataprocMetricConfig.Metric.Builder clear()
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public DataprocMetricConfig.Metric.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

clearMetricOverrides()

public DataprocMetricConfig.Metric.Builder clearMetricOverrides()

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

clearMetricSource()

public DataprocMetricConfig.Metric.Builder clearMetricSource()

Required. A standard set of metrics is collected unless metricOverrides are specified for the metric source (see Custom metrics for more information).

.google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DataprocMetricConfig.Metric.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

clone()

public DataprocMetricConfig.Metric.Builder clone()
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

getDefaultInstanceForType()

public DataprocMetricConfig.Metric getDefaultInstanceForType()
Returns
Type Description
DataprocMetricConfig.Metric

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMetricOverrides(int index)

public String getMetricOverrides(int index)

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The metricOverrides at the given index.

getMetricOverridesBytes(int index)

public ByteString getMetricOverridesBytes(int index)

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the metricOverrides at the given index.

getMetricOverridesCount()

public int getMetricOverridesCount()

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of metricOverrides.

getMetricOverridesList()

public ProtocolStringList getMetricOverridesList()

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the metricOverrides.

getMetricSource()

public DataprocMetricConfig.MetricSource getMetricSource()

Required. A standard set of metrics is collected unless metricOverrides are specified for the metric source (see Custom metrics for more information).

.google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DataprocMetricConfig.MetricSource

The metricSource.

getMetricSourceValue()

public int getMetricSourceValue()

Required. A standard set of metrics is collected unless metricOverrides are specified for the metric source (see Custom metrics for more information).

.google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for metricSource.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(DataprocMetricConfig.Metric other)

public DataprocMetricConfig.Metric.Builder mergeFrom(DataprocMetricConfig.Metric other)
Parameter
Name Description
other DataprocMetricConfig.Metric
Returns
Type Description
DataprocMetricConfig.Metric.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DataprocMetricConfig.Metric.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public DataprocMetricConfig.Metric.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DataprocMetricConfig.Metric.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public DataprocMetricConfig.Metric.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

setMetricOverrides(int index, String value)

public DataprocMetricConfig.Metric.Builder setMetricOverrides(int index, String value)

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: <code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code> 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.

repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The metricOverrides to set.

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

setMetricSource(DataprocMetricConfig.MetricSource value)

public DataprocMetricConfig.Metric.Builder setMetricSource(DataprocMetricConfig.MetricSource value)

Required. A standard set of metrics is collected unless metricOverrides are specified for the metric source (see Custom metrics for more information).

.google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value DataprocMetricConfig.MetricSource

The metricSource to set.

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

setMetricSourceValue(int value)

public DataprocMetricConfig.Metric.Builder setMetricSourceValue(int value)

Required. A standard set of metrics is collected unless metricOverrides are specified for the metric source (see Custom metrics for more information).

.google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for metricSource to set.

Returns
Type Description
DataprocMetricConfig.Metric.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DataprocMetricConfig.Metric.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DataprocMetricConfig.Metric.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DataprocMetricConfig.Metric.Builder
Overrides