Class Cluster.Builder (4.46.0)

public static final class Cluster.Builder extends GeneratedMessageV3.Builder<Cluster.Builder> implements ClusterOrBuilder

Describes the identifying information, config, and status of a Dataproc cluster

Protobuf type google.cloud.dataproc.v1.Cluster

Implements

ClusterOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllStatusHistory(Iterable<? extends ClusterStatus> values)

public Cluster.Builder addAllStatusHistory(Iterable<? extends ClusterStatus> values)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.cloud.dataproc.v1.ClusterStatus>
Returns
Type Description
Cluster.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addStatusHistory(ClusterStatus value)

public Cluster.Builder addStatusHistory(ClusterStatus value)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ClusterStatus
Returns
Type Description
Cluster.Builder

addStatusHistory(ClusterStatus.Builder builderForValue)

public Cluster.Builder addStatusHistory(ClusterStatus.Builder builderForValue)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue ClusterStatus.Builder
Returns
Type Description
Cluster.Builder

addStatusHistory(int index, ClusterStatus value)

public Cluster.Builder addStatusHistory(int index, ClusterStatus value)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value ClusterStatus
Returns
Type Description
Cluster.Builder

addStatusHistory(int index, ClusterStatus.Builder builderForValue)

public Cluster.Builder addStatusHistory(int index, ClusterStatus.Builder builderForValue)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue ClusterStatus.Builder
Returns
Type Description
Cluster.Builder

addStatusHistoryBuilder()

public ClusterStatus.Builder addStatusHistoryBuilder()

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ClusterStatus.Builder

addStatusHistoryBuilder(int index)

public ClusterStatus.Builder addStatusHistoryBuilder(int index)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ClusterStatus.Builder

build()

public Cluster build()
Returns
Type Description
Cluster

buildPartial()

public Cluster buildPartial()
Returns
Type Description
Cluster

clear()

public Cluster.Builder clear()
Returns
Type Description
Cluster.Builder
Overrides

clearClusterName()

public Cluster.Builder clearClusterName()

Required. The cluster name, which must be unique within a project. The name must start with a lowercase letter, and can contain up to 51 lowercase letters, numbers, and hyphens. It cannot end with a hyphen. The name of a deleted cluster can be reused.

string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Cluster.Builder

This builder for chaining.

clearClusterUuid()

public Cluster.Builder clearClusterUuid()

Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.

string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.Builder

This builder for chaining.

clearConfig()

public Cluster.Builder clearConfig()

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Cluster.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public Cluster.Builder clearLabels()
Returns
Type Description
Cluster.Builder

clearMetrics()

public Cluster.Builder clearMetrics()

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProjectId()

public Cluster.Builder clearProjectId()

Required. The Google Cloud Platform project ID that the cluster belongs to.

string project_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Cluster.Builder

This builder for chaining.

clearStatus()

public Cluster.Builder clearStatus()

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.Builder

clearStatusHistory()

public Cluster.Builder clearStatusHistory()

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Cluster.Builder

clearVirtualClusterConfig()

public Cluster.Builder clearVirtualClusterConfig()

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Cluster.Builder

clone()

public Cluster.Builder clone()
Returns
Type Description
Cluster.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getClusterName()

public String getClusterName()

Required. The cluster name, which must be unique within a project. The name must start with a lowercase letter, and can contain up to 51 lowercase letters, numbers, and hyphens. It cannot end with a hyphen. The name of a deleted cluster can be reused.

string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The clusterName.

getClusterNameBytes()

public ByteString getClusterNameBytes()

Required. The cluster name, which must be unique within a project. The name must start with a lowercase letter, and can contain up to 51 lowercase letters, numbers, and hyphens. It cannot end with a hyphen. The name of a deleted cluster can be reused.

string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for clusterName.

getClusterUuid()

public String getClusterUuid()

Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.

string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The clusterUuid.

getClusterUuidBytes()

public ByteString getClusterUuidBytes()

Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.

string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for clusterUuid.

getConfig()

public ClusterConfig getConfig()

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClusterConfig

The config.

getConfigBuilder()

public ClusterConfig.Builder getConfigBuilder()

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClusterConfig.Builder

getConfigOrBuilder()

public ClusterConfigOrBuilder getConfigOrBuilder()

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClusterConfigOrBuilder

getDefaultInstanceForType()

public Cluster getDefaultInstanceForType()
Returns
Type Description
Cluster

getDescriptorForType()

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

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMetrics()

public ClusterMetrics getMetrics()

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ClusterMetrics

The metrics.

getMetricsBuilder()

public ClusterMetrics.Builder getMetricsBuilder()

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ClusterMetrics.Builder

getMetricsOrBuilder()

public ClusterMetricsOrBuilder getMetricsOrBuilder()

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ClusterMetricsOrBuilder

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getProjectId()

public String getProjectId()

Required. The Google Cloud Platform project ID that the cluster belongs to.

string project_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The projectId.

getProjectIdBytes()

public ByteString getProjectIdBytes()

Required. The Google Cloud Platform project ID that the cluster belongs to.

string project_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for projectId.

getStatus()

public ClusterStatus getStatus()

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ClusterStatus

The status.

getStatusBuilder()

public ClusterStatus.Builder getStatusBuilder()

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ClusterStatus.Builder

getStatusHistory(int index)

public ClusterStatus getStatusHistory(int index)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ClusterStatus

getStatusHistoryBuilder(int index)

public ClusterStatus.Builder getStatusHistoryBuilder(int index)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ClusterStatus.Builder

getStatusHistoryBuilderList()

public List<ClusterStatus.Builder> getStatusHistoryBuilderList()

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getStatusHistoryCount()

public int getStatusHistoryCount()

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getStatusHistoryList()

public List<ClusterStatus> getStatusHistoryList()

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<ClusterStatus>

getStatusHistoryOrBuilder(int index)

public ClusterStatusOrBuilder getStatusHistoryOrBuilder(int index)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ClusterStatusOrBuilder

getStatusHistoryOrBuilderList()

public List<? extends ClusterStatusOrBuilder> getStatusHistoryOrBuilderList()

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.dataproc.v1.ClusterStatusOrBuilder>

getStatusOrBuilder()

public ClusterStatusOrBuilder getStatusOrBuilder()

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ClusterStatusOrBuilder

getVirtualClusterConfig()

public VirtualClusterConfig getVirtualClusterConfig()

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VirtualClusterConfig

The virtualClusterConfig.

getVirtualClusterConfigBuilder()

public VirtualClusterConfig.Builder getVirtualClusterConfigBuilder()

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VirtualClusterConfig.Builder

getVirtualClusterConfigOrBuilder()

public VirtualClusterConfigOrBuilder getVirtualClusterConfigOrBuilder()

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VirtualClusterConfigOrBuilder

hasConfig()

public boolean hasConfig()

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the config field is set.

hasMetrics()

public boolean hasMetrics()

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the metrics field is set.

hasStatus()

public boolean hasStatus()

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the status field is set.

hasVirtualClusterConfig()

public boolean hasVirtualClusterConfig()

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the virtualClusterConfig field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeConfig(ClusterConfig value)

public Cluster.Builder mergeConfig(ClusterConfig value)

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ClusterConfig
Returns
Type Description
Cluster.Builder

mergeFrom(Cluster other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMetrics(ClusterMetrics value)

public Cluster.Builder mergeMetrics(ClusterMetrics value)

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ClusterMetrics
Returns
Type Description
Cluster.Builder

mergeStatus(ClusterStatus value)

public Cluster.Builder mergeStatus(ClusterStatus value)

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ClusterStatus
Returns
Type Description
Cluster.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeVirtualClusterConfig(VirtualClusterConfig value)

public Cluster.Builder mergeVirtualClusterConfig(VirtualClusterConfig value)

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value VirtualClusterConfig
Returns
Type Description
Cluster.Builder

putAllLabels(Map<String,String> values)

public Cluster.Builder putAllLabels(Map<String,String> values)

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Cluster.Builder

putLabels(String key, String value)

public Cluster.Builder putLabels(String key, String value)

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
Cluster.Builder

removeLabels(String key)

public Cluster.Builder removeLabels(String key)

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
Cluster.Builder

removeStatusHistory(int index)

public Cluster.Builder removeStatusHistory(int index)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Cluster.Builder

setClusterName(String value)

public Cluster.Builder setClusterName(String value)

Required. The cluster name, which must be unique within a project. The name must start with a lowercase letter, and can contain up to 51 lowercase letters, numbers, and hyphens. It cannot end with a hyphen. The name of a deleted cluster can be reused.

string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The clusterName to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setClusterNameBytes(ByteString value)

public Cluster.Builder setClusterNameBytes(ByteString value)

Required. The cluster name, which must be unique within a project. The name must start with a lowercase letter, and can contain up to 51 lowercase letters, numbers, and hyphens. It cannot end with a hyphen. The name of a deleted cluster can be reused.

string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for clusterName to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setClusterUuid(String value)

public Cluster.Builder setClusterUuid(String value)

Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.

string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The clusterUuid to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setClusterUuidBytes(ByteString value)

public Cluster.Builder setClusterUuidBytes(ByteString value)

Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.

string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for clusterUuid to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setConfig(ClusterConfig value)

public Cluster.Builder setConfig(ClusterConfig value)

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ClusterConfig
Returns
Type Description
Cluster.Builder

setConfig(ClusterConfig.Builder builderForValue)

public Cluster.Builder setConfig(ClusterConfig.Builder builderForValue)

Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.

Exactly one of ClusterConfig or VirtualClusterConfig must be specified.

.google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ClusterConfig.Builder
Returns
Type Description
Cluster.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setMetrics(ClusterMetrics value)

public Cluster.Builder setMetrics(ClusterMetrics value)

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ClusterMetrics
Returns
Type Description
Cluster.Builder

setMetrics(ClusterMetrics.Builder builderForValue)

public Cluster.Builder setMetrics(ClusterMetrics.Builder builderForValue)

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

.google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue ClusterMetrics.Builder
Returns
Type Description
Cluster.Builder

setProjectId(String value)

public Cluster.Builder setProjectId(String value)

Required. The Google Cloud Platform project ID that the cluster belongs to.

string project_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The projectId to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

setProjectIdBytes(ByteString value)

public Cluster.Builder setProjectIdBytes(ByteString value)

Required. The Google Cloud Platform project ID that the cluster belongs to.

string project_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for projectId to set.

Returns
Type Description
Cluster.Builder

This builder for chaining.

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

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

setStatus(ClusterStatus value)

public Cluster.Builder setStatus(ClusterStatus value)

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ClusterStatus
Returns
Type Description
Cluster.Builder

setStatus(ClusterStatus.Builder builderForValue)

public Cluster.Builder setStatus(ClusterStatus.Builder builderForValue)

Output only. Cluster status.

.google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue ClusterStatus.Builder
Returns
Type Description
Cluster.Builder

setStatusHistory(int index, ClusterStatus value)

public Cluster.Builder setStatusHistory(int index, ClusterStatus value)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value ClusterStatus
Returns
Type Description
Cluster.Builder

setStatusHistory(int index, ClusterStatus.Builder builderForValue)

public Cluster.Builder setStatusHistory(int index, ClusterStatus.Builder builderForValue)

Output only. The previous cluster status.

repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue ClusterStatus.Builder
Returns
Type Description
Cluster.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setVirtualClusterConfig(VirtualClusterConfig value)

public Cluster.Builder setVirtualClusterConfig(VirtualClusterConfig value)

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value VirtualClusterConfig
Returns
Type Description
Cluster.Builder

setVirtualClusterConfig(VirtualClusterConfig.Builder builderForValue)

public Cluster.Builder setVirtualClusterConfig(VirtualClusterConfig.Builder builderForValue)

Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.

.google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue VirtualClusterConfig.Builder
Returns
Type Description
Cluster.Builder