Class Cluster (4.44.0)

public final class Cluster extends GeneratedMessageV3 implements ClusterOrBuilder

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

Protobuf type google.cloud.dataproc.v1.Cluster

Implements

ClusterOrBuilder

Static Fields

CLUSTER_NAME_FIELD_NUMBER

public static final int CLUSTER_NAME_FIELD_NUMBER
Field Value
Type Description
int

CLUSTER_UUID_FIELD_NUMBER

public static final int CLUSTER_UUID_FIELD_NUMBER
Field Value
Type Description
int

CONFIG_FIELD_NUMBER

public static final int CONFIG_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

METRICS_FIELD_NUMBER

public static final int METRICS_FIELD_NUMBER
Field Value
Type Description
int

PROJECT_ID_FIELD_NUMBER

public static final int PROJECT_ID_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
Type Description
int

STATUS_HISTORY_FIELD_NUMBER

public static final int STATUS_HISTORY_FIELD_NUMBER
Field Value
Type Description
int

VIRTUAL_CLUSTER_CONFIG_FIELD_NUMBER

public static final int VIRTUAL_CLUSTER_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Cluster getDefaultInstance()
Returns
Type Description
Cluster

getDescriptor()

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

newBuilder()

public static Cluster.Builder newBuilder()
Returns
Type Description
Cluster.Builder

newBuilder(Cluster prototype)

public static Cluster.Builder newBuilder(Cluster prototype)
Parameter
Name Description
prototype Cluster
Returns
Type Description
Cluster.Builder

parseDelimitedFrom(InputStream input)

public static Cluster parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Cluster
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Cluster parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Cluster
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Cluster parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Cluster
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Cluster parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Cluster
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Cluster parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Cluster
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Cluster parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Cluster
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Cluster parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Cluster
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Cluster parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Cluster
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Cluster parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Cluster
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Cluster parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Cluster
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Cluster parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Cluster
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Cluster parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Cluster
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Cluster> parser()
Returns
Type Description
Parser<Cluster>

Methods

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

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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.

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

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.

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

getParserForType()

public Parser<Cluster> getParserForType()
Returns
Type Description
Parser<Cluster>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

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.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Cluster.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Cluster.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException