Class Cluster

  • All Implemented Interfaces:
    ClusterOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Cluster
    extends com.google.protobuf.GeneratedMessageV3
    implements ClusterOrBuilder
     Describes the identifying information, config, and status of
     a Dataproc cluster
     
    Protobuf type google.cloud.dataproc.v1.Cluster
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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];
        Specified by:
        getProjectId in interface ClusterOrBuilder
        Returns:
        The projectId.
      • getProjectIdBytes

        public com.google.protobuf.ByteString getProjectIdBytes()
         Required. The Google Cloud Platform project ID that the cluster belongs to.
         
        string project_id = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getProjectIdBytes in interface ClusterOrBuilder
        Returns:
        The bytes for projectId.
      • 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];
        Specified by:
        getClusterName in interface ClusterOrBuilder
        Returns:
        The clusterName.
      • getClusterNameBytes

        public com.google.protobuf.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];
        Specified by:
        getClusterNameBytes in interface ClusterOrBuilder
        Returns:
        The bytes for clusterName.
      • 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];
        Specified by:
        hasConfig in interface ClusterOrBuilder
        Returns:
        Whether the config field is set.
      • 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];
        Specified by:
        getConfig in interface ClusterOrBuilder
        Returns:
        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];
        Specified by:
        getConfigOrBuilder in interface ClusterOrBuilder
      • 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](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview).
         Dataproc may set default values, and values may change when
         clusters are updated. Exactly one of
         [config][google.cloud.dataproc.v1.Cluster.config] or
         [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
         must be specified.
         
        .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasVirtualClusterConfig in interface ClusterOrBuilder
        Returns:
        Whether the virtualClusterConfig field is set.
      • 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](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview).
         Dataproc may set default values, and values may change when
         clusters are updated. Exactly one of
         [config][google.cloud.dataproc.v1.Cluster.config] or
         [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
         must be specified.
         
        .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getVirtualClusterConfig in interface ClusterOrBuilder
        Returns:
        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](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview).
         Dataproc may set default values, and values may change when
         clusters are updated. Exactly one of
         [config][google.cloud.dataproc.v1.Cluster.config] or
         [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
         must be specified.
         
        .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getVirtualClusterConfigOrBuilder in interface ClusterOrBuilder
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: ClusterOrBuilder
         Optional. The labels to associate with this cluster.
         Label **keys** must contain 1 to 63 characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to [RFC
         1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
         associated with a cluster.
         
        map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface ClusterOrBuilder
      • containsLabels

        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](https://www.ietf.org/rfc/rfc1035.txt).
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to [RFC
         1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
         associated with a cluster.
         
        map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface ClusterOrBuilder
      • 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](https://www.ietf.org/rfc/rfc1035.txt).
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to [RFC
         1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
         associated with a cluster.
         
        map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface ClusterOrBuilder
      • getLabelsOrDefault

        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](https://www.ietf.org/rfc/rfc1035.txt).
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to [RFC
         1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
         associated with a cluster.
         
        map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface ClusterOrBuilder
      • getLabelsOrThrow

        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](https://www.ietf.org/rfc/rfc1035.txt).
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to [RFC
         1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
         associated with a cluster.
         
        map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface ClusterOrBuilder
      • hasStatus

        public boolean hasStatus()
         Output only. Cluster status.
         
        .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasStatus in interface ClusterOrBuilder
        Returns:
        Whether the status field is set.
      • getStatus

        public ClusterStatus getStatus()
         Output only. Cluster status.
         
        .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStatus in interface ClusterOrBuilder
        Returns:
        The status.
      • 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];
        Specified by:
        getStatusHistoryList in interface ClusterOrBuilder
      • 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];
        Specified by:
        getStatusHistoryCount in interface ClusterOrBuilder
      • getStatusHistory

        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];
        Specified by:
        getStatusHistory in interface ClusterOrBuilder
      • getStatusHistoryOrBuilder

        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];
        Specified by:
        getStatusHistoryOrBuilder in interface ClusterOrBuilder
      • 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];
        Specified by:
        getClusterUuid in interface ClusterOrBuilder
        Returns:
        The clusterUuid.
      • getClusterUuidBytes

        public com.google.protobuf.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];
        Specified by:
        getClusterUuidBytes in interface ClusterOrBuilder
        Returns:
        The bytes for clusterUuid.
      • 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];
        Specified by:
        hasMetrics in interface ClusterOrBuilder
        Returns:
        Whether the metrics field is set.
      • 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];
        Specified by:
        getMetrics in interface ClusterOrBuilder
        Returns:
        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];
        Specified by:
        getMetricsOrBuilder in interface ClusterOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Cluster parseFrom​(ByteBuffer data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Cluster parseFrom​(ByteBuffer data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Cluster parseFrom​(com.google.protobuf.ByteString data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Cluster parseFrom​(com.google.protobuf.ByteString data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Cluster parseFrom​(byte[] data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Cluster parseFrom​(byte[] data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Cluster parseFrom​(com.google.protobuf.CodedInputStream input,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Cluster.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Cluster.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Cluster.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Cluster getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Cluster> parser()
      • getParserForType

        public com.google.protobuf.Parser<Cluster> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Cluster getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder