Class: Google::Apis::DataprocV1::InstanceGroupConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dataproc_v1/classes.rb,
lib/google/apis/dataproc_v1/representations.rb,
lib/google/apis/dataproc_v1/representations.rb

Overview

The config settings for Compute Engine resources in an instance group, such as a master or worker group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceGroupConfig

Returns a new instance of InstanceGroupConfig.



4171
4172
4173
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4171

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#acceleratorsArray<Google::Apis::DataprocV1::AcceleratorConfig>

Optional. The Compute Engine accelerator configuration for these instances. Corresponds to the JSON property accelerators



4071
4072
4073
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4071

def accelerators
  @accelerators
end

#disk_configGoogle::Apis::DataprocV1::DiskConfig

Specifies the config of boot disk and attached disk options for a group of VM instances. Corresponds to the JSON property diskConfig



4077
4078
4079
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4077

def disk_config
  @disk_config
end

#image_uriString

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-idImage family examples. The service 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. Corresponds to the JSON property imageUri

Returns:

  • (String)


4090
4091
4092
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4090

def image_uri
  @image_uri
end

#instance_flexibility_policyGoogle::Apis::DataprocV1::InstanceFlexibilityPolicy

Instance flexibility Policy allowing a mixture of VM shapes and provisioning models. Corresponds to the JSON property instanceFlexibilityPolicy



4096
4097
4098
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4096

def instance_flexibility_policy
  @instance_flexibility_policy
end

#instance_namesArray<String>

Output only. The list of instance names, derived from cluster_name, num_instances, and the instance group. Corresponds to the JSON property instanceNames

Returns:

  • (Array<String>)


4102
4103
4104
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4102

def instance_names
  @instance_names
end

#instance_referencesArray<Google::Apis::DataprocV1::InstanceReference>

Output only. List of references to Compute Engine instances. Corresponds to the JSON property instanceReferences



4107
4108
4109
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4107

def instance_references
  @instance_references
end

#is_preemptibleBoolean Also known as: is_preemptible?

Output only. Specifies that this instance group contains preemptible instances. Corresponds to the JSON property isPreemptible

Returns:

  • (Boolean)


4112
4113
4114
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4112

def is_preemptible
  @is_preemptible
end

#machine_type_uriString

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- 2Auto Zone Exception: If you are using Auto Zone Placement (https://cloud. google.com/dataproc/docs/concepts/configuring-clusters/auto-zone# using_auto_zone_placement), you must use the short name of the machine type resource, for example, n1-standard-2. Corresponds to the JSON property machineTypeUri

Returns:

  • (String)


4125
4126
4127
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4125

def machine_type_uri
  @machine_type_uri
end

#managed_group_configGoogle::Apis::DataprocV1::ManagedGroupConfig

Specifies the resources used to actively manage an instance group. Corresponds to the JSON property managedGroupConfig



4130
4131
4132
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4130

def managed_group_config
  @managed_group_config
end

#min_cpu_platformString

Optional. Specifies the minimum cpu platform for the Instance Group. See Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/ dataproc-min-cpu). Corresponds to the JSON property minCpuPlatform

Returns:

  • (String)


4137
4138
4139
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4137

def min_cpu_platform
  @min_cpu_platform
end

#min_num_instancesFixnum

Optional. The minimum number of primary worker instances to create. If min_num_instances is set, cluster creation will succeed if the number of primary workers created is at least equal to the min_num_instances number. Example: Cluster creation request with num_instances = 5 and min_num_instances = 3: If 4 VMs are created and 1 instance fails, the failed VM is deleted. The cluster is resized to 4 instances and placed in a RUNNING state. If 2 instances are created and 3 instances fail, the cluster in placed in an ERROR state. The failed VMs are not deleted. Corresponds to the JSON property minNumInstances

Returns:

  • (Fixnum)


4149
4150
4151
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4149

def min_num_instances
  @min_num_instances
end

#num_instancesFixnum

Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1. Corresponds to the JSON property numInstances

Returns:

  • (Fixnum)


4156
4157
4158
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4156

def num_instances
  @num_instances
end

#preemptibilityString

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. Corresponds to the JSON property preemptibility

Returns:

  • (String)


4163
4164
4165
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4163

def preemptibility
  @preemptibility
end

#startup_configGoogle::Apis::DataprocV1::StartupConfig

Configuration to handle the startup of instances during cluster create and update process. Corresponds to the JSON property startupConfig



4169
4170
4171
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4169

def startup_config
  @startup_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
# File 'lib/google/apis/dataproc_v1/classes.rb', line 4176

def update!(**args)
  @accelerators = args[:accelerators] if args.key?(:accelerators)
  @disk_config = args[:disk_config] if args.key?(:disk_config)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
  @instance_flexibility_policy = args[:instance_flexibility_policy] if args.key?(:instance_flexibility_policy)
  @instance_names = args[:instance_names] if args.key?(:instance_names)
  @instance_references = args[:instance_references] if args.key?(:instance_references)
  @is_preemptible = args[:is_preemptible] if args.key?(:is_preemptible)
  @machine_type_uri = args[:machine_type_uri] if args.key?(:machine_type_uri)
  @managed_group_config = args[:managed_group_config] if args.key?(:managed_group_config)
  @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform)
  @min_num_instances = args[:min_num_instances] if args.key?(:min_num_instances)
  @num_instances = args[:num_instances] if args.key?(:num_instances)
  @preemptibility = args[:preemptibility] if args.key?(:preemptibility)
  @startup_config = args[:startup_config] if args.key?(:startup_config)
end