Class Cluster.Builder (4.29.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.dataproc.v1.ClusterStatus>
Returns
TypeDescription
Cluster.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Cluster.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueClusterStatus
Returns
TypeDescription
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
NameDescription
builderForValueClusterStatus.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueClusterStatus
Returns
TypeDescription
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
NameDescription
indexint
builderForValueClusterStatus.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ClusterStatus.Builder

build()

public Cluster build()
Returns
TypeDescription
Cluster

buildPartial()

public Cluster buildPartial()
Returns
TypeDescription
Cluster

clear()

public Cluster.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Cluster.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public Cluster.Builder clearLabels()
Returns
TypeDescription
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
TypeDescription
Cluster.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Cluster.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Cluster.Builder

clone()

public Cluster.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ClusterConfigOrBuilder

getDefaultInstanceForType()

public Cluster getDefaultInstanceForType()
Returns
TypeDescription
Cluster

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ClusterMetricsOrBuilder

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the virtualClusterConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueClusterConfig
Returns
TypeDescription
Cluster.Builder

mergeFrom(Cluster other)

public Cluster.Builder mergeFrom(Cluster other)
Parameter
NameDescription
otherCluster
Returns
TypeDescription
Cluster.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Cluster.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueClusterMetrics
Returns
TypeDescription
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
NameDescription
valueClusterStatus
Returns
TypeDescription
Cluster.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Cluster.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueVirtualClusterConfig
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The clusterName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for clusterName to set.

Returns
TypeDescription
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
NameDescription
valueString

The clusterUuid to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for clusterUuid to set.

Returns
TypeDescription
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
NameDescription
valueClusterConfig
Returns
TypeDescription
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
NameDescription
builderForValueClusterConfig.Builder
Returns
TypeDescription
Cluster.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Cluster.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueClusterMetrics
Returns
TypeDescription
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
NameDescription
builderForValueClusterMetrics.Builder
Returns
TypeDescription
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
NameDescription
valueString

The projectId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for projectId to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueClusterStatus
Returns
TypeDescription
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
NameDescription
builderForValueClusterStatus.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueClusterStatus
Returns
TypeDescription
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
NameDescription
indexint
builderForValueClusterStatus.Builder
Returns
TypeDescription
Cluster.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Cluster.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueVirtualClusterConfig
Returns
TypeDescription
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
NameDescription
builderForValueVirtualClusterConfig.Builder
Returns
TypeDescription
Cluster.Builder