Class DataprocMetricConfig.Metric.Builder (4.19.0)

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

A Dataproc OSS metric.

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllMetricOverrides(Iterable<String> values)

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

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Parameter
NameDescription
valuesIterable<String>

The metricOverrides to add.

Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

This builder for chaining.

addMetricOverrides(String value)

public DataprocMetricConfig.Metric.Builder addMetricOverrides(String value)

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Parameter
NameDescription
valueString

The metricOverrides to add.

Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

This builder for chaining.

addMetricOverridesBytes(ByteString value)

public DataprocMetricConfig.Metric.Builder addMetricOverridesBytes(ByteString value)

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Parameter
NameDescription
valueByteString

The bytes of the metricOverrides to add.

Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DataprocMetricConfig.Metric.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

build()

public DataprocMetricConfig.Metric build()
Returns
TypeDescription
DataprocMetricConfig.Metric

buildPartial()

public DataprocMetricConfig.Metric buildPartial()
Returns
TypeDescription
DataprocMetricConfig.Metric

clear()

public DataprocMetricConfig.Metric.Builder clear()
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public DataprocMetricConfig.Metric.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

clearMetricOverrides()

public DataprocMetricConfig.Metric.Builder clearMetricOverrides()

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

This builder for chaining.

clearMetricSource()

public DataprocMetricConfig.Metric.Builder clearMetricSource()

Required. Default metrics are collected unless metricOverrides are specified for the metric source (see Available OSS metrics for more information).

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

Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DataprocMetricConfig.Metric.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

clone()

public DataprocMetricConfig.Metric.Builder clone()
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

getDefaultInstanceForType()

public DataprocMetricConfig.Metric getDefaultInstanceForType()
Returns
TypeDescription
DataprocMetricConfig.Metric

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMetricOverrides(int index)

public String getMetricOverrides(int index)

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The metricOverrides at the given index.

getMetricOverridesBytes(int index)

public ByteString getMetricOverridesBytes(int index)

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the metricOverrides at the given index.

getMetricOverridesCount()

public int getMetricOverridesCount()

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Returns
TypeDescription
int

The count of metricOverrides.

getMetricOverridesList()

public ProtocolStringList getMetricOverridesList()

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Returns
TypeDescription
ProtocolStringList

A list containing the metricOverrides.

getMetricSource()

public DataprocMetricConfig.MetricSource getMetricSource()

Required. Default metrics are collected unless metricOverrides are specified for the metric source (see Available OSS metrics for more information).

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

Returns
TypeDescription
DataprocMetricConfig.MetricSource

The metricSource.

getMetricSourceValue()

public int getMetricSourceValue()

Required. Default metrics are collected unless metricOverrides are specified for the metric source (see Available OSS metrics for more information).

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

Returns
TypeDescription
int

The enum numeric value on the wire for metricSource.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(DataprocMetricConfig.Metric other)

public DataprocMetricConfig.Metric.Builder mergeFrom(DataprocMetricConfig.Metric other)
Parameter
NameDescription
otherDataprocMetricConfig.Metric
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DataprocMetricConfig.Metric.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DataprocMetricConfig.Metric.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DataprocMetricConfig.Metric.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public DataprocMetricConfig.Metric.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

setMetricOverrides(int index, String value)

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

Optional. Specify one or more available OSS 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 will be collected for the metric source. For example, if one or more
spark:executive metrics are listed as metric overrides, other SPARK metrics will not be collected. The collection of the default metrics for other OSS metric sources is unaffected. For example, if both SPARK andd YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all default YARN metrics will be collected.

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

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The metricOverrides to set.

Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

This builder for chaining.

setMetricSource(DataprocMetricConfig.MetricSource value)

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

Required. Default metrics are collected unless metricOverrides are specified for the metric source (see Available OSS metrics for more information).

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

Parameter
NameDescription
valueDataprocMetricConfig.MetricSource

The metricSource to set.

Returns
TypeDescription
DataprocMetricConfig.Metric.Builder

This builder for chaining.

setMetricSourceValue(int value)

public DataprocMetricConfig.Metric.Builder setMetricSourceValue(int value)

Required. Default metrics are collected unless metricOverrides are specified for the metric source (see Available OSS metrics for more information).

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

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DataprocMetricConfig.Metric.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DataprocMetricConfig.Metric.Builder
Overrides