Class: Google::Apis::DataprocV1::ClusterConfig

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

Overview

The cluster config.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ClusterConfig

Returns a new instance of ClusterConfig



1162
1163
1164
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1162

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

Instance Attribute Details

#config_bucketString

Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project- level, per-location bucket for you. Corresponds to the JSON property configBucket

Returns:

  • (String)


1131
1132
1133
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1131

def config_bucket
  @config_bucket
end

#gce_cluster_configGoogle::Apis::DataprocV1::GceClusterConfig

Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster. Corresponds to the JSON property gceClusterConfig



1143
1144
1145
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1143

def gce_cluster_config
  @gce_cluster_config
end

#initialization_actionsArray<Google::Apis::DataprocV1::NodeInitializationAction>

Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/ instance/attributes/dataproc-role) if [[ "$ROLE" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi Corresponds to the JSON property initializationActions



1121
1122
1123
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1121

def initialization_actions
  @initialization_actions
end

#master_configGoogle::Apis::DataprocV1::InstanceGroupConfig

Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. Corresponds to the JSON property masterConfig



1154
1155
1156
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1154

def master_config
  @master_config
end

#secondary_worker_configGoogle::Apis::DataprocV1::InstanceGroupConfig

Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. Corresponds to the JSON property secondaryWorkerConfig



1160
1161
1162
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1160

def secondary_worker_config
  @secondary_worker_config
end

#software_configGoogle::Apis::DataprocV1::SoftwareConfig

Specifies the selection and config of software inside the cluster. Corresponds to the JSON property softwareConfig



1148
1149
1150
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1148

def software_config
  @software_config
end

#worker_configGoogle::Apis::DataprocV1::InstanceGroupConfig

Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. Corresponds to the JSON property workerConfig



1137
1138
1139
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1137

def worker_config
  @worker_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1167
1168
1169
1170
1171
1172
1173
1174
1175
# File 'generated/google/apis/dataproc_v1/classes.rb', line 1167

def update!(**args)
  @initialization_actions = args[:initialization_actions] if args.key?(:initialization_actions)
  @config_bucket = args[:config_bucket] if args.key?(:config_bucket)
  @worker_config = args[:worker_config] if args.key?(:worker_config)
  @gce_cluster_config = args[:gce_cluster_config] if args.key?(:gce_cluster_config)
  @software_config = args[:software_config] if args.key?(:software_config)
  @master_config = args[:master_config] if args.key?(:master_config)
  @secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config)
end