Class InstanceGroupConfig

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

    public final class InstanceGroupConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements InstanceGroupConfigOrBuilder
     The config settings for Compute Engine resources in
     an instance group, such as a master or worker group.
     
    Protobuf type google.cloud.dataproc.v1.InstanceGroupConfig
    See Also:
    Serialized Form
    • Field Detail

      • NUM_INSTANCES_FIELD_NUMBER

        public static final int NUM_INSTANCES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INSTANCE_NAMES_FIELD_NUMBER

        public static final int INSTANCE_NAMES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INSTANCE_REFERENCES_FIELD_NUMBER

        public static final int INSTANCE_REFERENCES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MACHINE_TYPE_URI_FIELD_NUMBER

        public static final int MACHINE_TYPE_URI_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DISK_CONFIG_FIELD_NUMBER

        public static final int DISK_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • IS_PREEMPTIBLE_FIELD_NUMBER

        public static final int IS_PREEMPTIBLE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PREEMPTIBILITY_FIELD_NUMBER

        public static final int PREEMPTIBILITY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MANAGED_GROUP_CONFIG_FIELD_NUMBER

        public static final int MANAGED_GROUP_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ACCELERATORS_FIELD_NUMBER

        public static final int ACCELERATORS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MIN_CPU_PLATFORM_FIELD_NUMBER

        public static final int MIN_CPU_PLATFORM_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MIN_NUM_INSTANCES_FIELD_NUMBER

        public static final int MIN_NUM_INSTANCES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INSTANCE_FLEXIBILITY_POLICY_FIELD_NUMBER

        public static final int INSTANCE_FLEXIBILITY_POLICY_FIELD_NUMBER
        See Also:
        Constant Field Values
    • 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()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getNumInstances

        public int getNumInstances()
         Optional. The number of VM instances in the instance group.
         For [HA
         cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
         [master_config](#FIELDS.master_config) groups, **must be set to 3**.
         For standard cluster [master_config](#FIELDS.master_config) groups,
         **must be set to 1**.
         
        int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getNumInstances in interface InstanceGroupConfigOrBuilder
        Returns:
        The numInstances.
      • getInstanceNamesList

        public com.google.protobuf.ProtocolStringList getInstanceNamesList()
         Output only. The list of instance names. Dataproc derives the names
         from `cluster_name`, `num_instances`, and the instance group.
         
        repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getInstanceNamesList in interface InstanceGroupConfigOrBuilder
        Returns:
        A list containing the instanceNames.
      • getInstanceNamesCount

        public int getInstanceNamesCount()
         Output only. The list of instance names. Dataproc derives the names
         from `cluster_name`, `num_instances`, and the instance group.
         
        repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getInstanceNamesCount in interface InstanceGroupConfigOrBuilder
        Returns:
        The count of instanceNames.
      • getInstanceNames

        public String getInstanceNames​(int index)
         Output only. The list of instance names. Dataproc derives the names
         from `cluster_name`, `num_instances`, and the instance group.
         
        repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getInstanceNames in interface InstanceGroupConfigOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The instanceNames at the given index.
      • getInstanceNamesBytes

        public com.google.protobuf.ByteString getInstanceNamesBytes​(int index)
         Output only. The list of instance names. Dataproc derives the names
         from `cluster_name`, `num_instances`, and the instance group.
         
        repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getInstanceNamesBytes in interface InstanceGroupConfigOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the instanceNames at the given index.
      • getInstanceReferencesCount

        public int getInstanceReferencesCount()
         Output only. List of references to Compute Engine instances.
         
        repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getInstanceReferencesCount in interface InstanceGroupConfigOrBuilder
      • getInstanceReferences

        public InstanceReference getInstanceReferences​(int index)
         Output only. List of references to Compute Engine instances.
         
        repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getInstanceReferences in interface InstanceGroupConfigOrBuilder
      • getImageUri

        public String getImageUri()
         Optional. The Compute Engine image resource used for cluster instances.
        
         The URI can represent an image or image family.
        
         Image examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
         * `projects/[project_id]/global/images/[image-id]`
         * `image-id`
        
         Image family examples. Dataproc will use the most recent
         image from the family:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
         * `projects/[project_id]/global/images/family/[custom-image-family-name]`
        
         If the URI is unspecified, it will be inferred from
         `SoftwareConfig.image_version` or the system default.
         
        string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getImageUri in interface InstanceGroupConfigOrBuilder
        Returns:
        The imageUri.
      • getImageUriBytes

        public com.google.protobuf.ByteString getImageUriBytes()
         Optional. The Compute Engine image resource used for cluster instances.
        
         The URI can represent an image or image family.
        
         Image examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
         * `projects/[project_id]/global/images/[image-id]`
         * `image-id`
        
         Image family examples. Dataproc will use the most recent
         image from the family:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
         * `projects/[project_id]/global/images/family/[custom-image-family-name]`
        
         If the URI is unspecified, it will be inferred from
         `SoftwareConfig.image_version` or the system default.
         
        string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getImageUriBytes in interface InstanceGroupConfigOrBuilder
        Returns:
        The bytes for imageUri.
      • getMachineTypeUri

        public String getMachineTypeUri()
         Optional. The Compute Engine machine type used for cluster instances.
        
         A full URL, partial URI, or short name are valid. Examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
         * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
         * `n1-standard-2`
        
         **Auto Zone Exception**: If you are using the Dataproc
         [Auto Zone
         Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
         feature, you must use the short name of the machine type
         resource, for example, `n1-standard-2`.
         
        string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMachineTypeUri in interface InstanceGroupConfigOrBuilder
        Returns:
        The machineTypeUri.
      • getMachineTypeUriBytes

        public com.google.protobuf.ByteString getMachineTypeUriBytes()
         Optional. The Compute Engine machine type used for cluster instances.
        
         A full URL, partial URI, or short name are valid. Examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
         * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
         * `n1-standard-2`
        
         **Auto Zone Exception**: If you are using the Dataproc
         [Auto Zone
         Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
         feature, you must use the short name of the machine type
         resource, for example, `n1-standard-2`.
         
        string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMachineTypeUriBytes in interface InstanceGroupConfigOrBuilder
        Returns:
        The bytes for machineTypeUri.
      • hasDiskConfig

        public boolean hasDiskConfig()
         Optional. Disk option config settings.
         
        .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasDiskConfig in interface InstanceGroupConfigOrBuilder
        Returns:
        Whether the diskConfig field is set.
      • getDiskConfig

        public DiskConfig getDiskConfig()
         Optional. Disk option config settings.
         
        .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskConfig in interface InstanceGroupConfigOrBuilder
        Returns:
        The diskConfig.
      • getIsPreemptible

        public boolean getIsPreemptible()
         Output only. Specifies that this instance group contains preemptible
         instances.
         
        bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getIsPreemptible in interface InstanceGroupConfigOrBuilder
        Returns:
        The isPreemptible.
      • getPreemptibilityValue

        public int getPreemptibilityValue()
         Optional. Specifies the preemptibility of the instance group.
        
         The default value for master and worker groups is
         `NON_PREEMPTIBLE`. This default cannot be changed.
        
         The default value for secondary instances is
         `PREEMPTIBLE`.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPreemptibilityValue in interface InstanceGroupConfigOrBuilder
        Returns:
        The enum numeric value on the wire for preemptibility.
      • getPreemptibility

        public InstanceGroupConfig.Preemptibility getPreemptibility()
         Optional. Specifies the preemptibility of the instance group.
        
         The default value for master and worker groups is
         `NON_PREEMPTIBLE`. This default cannot be changed.
        
         The default value for secondary instances is
         `PREEMPTIBLE`.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPreemptibility in interface InstanceGroupConfigOrBuilder
        Returns:
        The preemptibility.
      • hasManagedGroupConfig

        public boolean hasManagedGroupConfig()
         Output only. The config for Compute Engine Instance Group
         Manager that manages this group.
         This is only used for preemptible instance groups.
         
        .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasManagedGroupConfig in interface InstanceGroupConfigOrBuilder
        Returns:
        Whether the managedGroupConfig field is set.
      • getManagedGroupConfig

        public ManagedGroupConfig getManagedGroupConfig()
         Output only. The config for Compute Engine Instance Group
         Manager that manages this group.
         This is only used for preemptible instance groups.
         
        .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getManagedGroupConfig in interface InstanceGroupConfigOrBuilder
        Returns:
        The managedGroupConfig.
      • getManagedGroupConfigOrBuilder

        public ManagedGroupConfigOrBuilder getManagedGroupConfigOrBuilder()
         Output only. The config for Compute Engine Instance Group
         Manager that manages this group.
         This is only used for preemptible instance groups.
         
        .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getManagedGroupConfigOrBuilder in interface InstanceGroupConfigOrBuilder
      • getAcceleratorsList

        public List<AcceleratorConfig> getAcceleratorsList()
         Optional. The Compute Engine accelerator configuration for these
         instances.
         
        repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getAcceleratorsList in interface InstanceGroupConfigOrBuilder
      • getAcceleratorsCount

        public int getAcceleratorsCount()
         Optional. The Compute Engine accelerator configuration for these
         instances.
         
        repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getAcceleratorsCount in interface InstanceGroupConfigOrBuilder
      • getAccelerators

        public AcceleratorConfig getAccelerators​(int index)
         Optional. The Compute Engine accelerator configuration for these
         instances.
         
        repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getAccelerators in interface InstanceGroupConfigOrBuilder
      • getMinCpuPlatform

        public String getMinCpuPlatform()
         Optional. Specifies the minimum cpu platform for the Instance Group.
         See [Dataproc -> Minimum CPU
         Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
         
        string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMinCpuPlatform in interface InstanceGroupConfigOrBuilder
        Returns:
        The minCpuPlatform.
      • getMinCpuPlatformBytes

        public com.google.protobuf.ByteString getMinCpuPlatformBytes()
         Optional. Specifies the minimum cpu platform for the Instance Group.
         See [Dataproc -> Minimum CPU
         Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
         
        string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMinCpuPlatformBytes in interface InstanceGroupConfigOrBuilder
        Returns:
        The bytes for minCpuPlatform.
      • getMinNumInstances

        public int getMinNumInstances()
         Optional. The minimum number of instances to create.
         If min_num_instances is set, min_num_instances is used for a criteria to
         decide the cluster. Cluster creation will be failed by being an error state
         if the total number of instances created is less than the
         min_num_instances.
         For example, given that num_instances = 5 and min_num_instances = 3,
         * if 4 instances are created and then registered successfully but one
         instance is failed, the failed VM will be deleted and the cluster will be
         resized to 4 instances in running state.
         * if 2 instances are created successfully and 3 instances are failed,
         the cluster will be in an error state and does not delete failed VMs for
         debugging.
         * if 2 instance are created and then registered successfully but 3
         instances are failed to initialize, the cluster will be in an error state
         and does not delete failed VMs for debugging.
         NB: This can only be set for primary workers now.
         
        int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMinNumInstances in interface InstanceGroupConfigOrBuilder
        Returns:
        The minNumInstances.
      • hasInstanceFlexibilityPolicy

        public boolean hasInstanceFlexibilityPolicy()
         Optional. Instance flexibility Policy allowing a mixture of VM shapes and
         provisioning models.
         
        .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasInstanceFlexibilityPolicy in interface InstanceGroupConfigOrBuilder
        Returns:
        Whether the instanceFlexibilityPolicy field is set.
      • getInstanceFlexibilityPolicy

        public InstanceFlexibilityPolicy getInstanceFlexibilityPolicy()
         Optional. Instance flexibility Policy allowing a mixture of VM shapes and
         provisioning models.
         
        .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getInstanceFlexibilityPolicy in interface InstanceGroupConfigOrBuilder
        Returns:
        The instanceFlexibilityPolicy.
      • 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 InstanceGroupConfig parseFrom​(ByteBuffer data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public com.google.protobuf.Parser<InstanceGroupConfig> 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 InstanceGroupConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder