#[non_exhaustive]pub struct ClusterConfig {Show 17 fields
pub cluster_tier: ClusterTier,
pub config_bucket: String,
pub temp_bucket: String,
pub gce_cluster_config: Option<GceClusterConfig>,
pub master_config: Option<InstanceGroupConfig>,
pub worker_config: Option<InstanceGroupConfig>,
pub secondary_worker_config: Option<InstanceGroupConfig>,
pub software_config: Option<SoftwareConfig>,
pub initialization_actions: Vec<NodeInitializationAction>,
pub encryption_config: Option<EncryptionConfig>,
pub autoscaling_config: Option<AutoscalingConfig>,
pub security_config: Option<SecurityConfig>,
pub lifecycle_config: Option<LifecycleConfig>,
pub endpoint_config: Option<EndpointConfig>,
pub metastore_config: Option<MetastoreConfig>,
pub dataproc_metric_config: Option<DataprocMetricConfig>,
pub auxiliary_node_groups: Vec<AuxiliaryNodeGroup>,
/* private fields */
}Expand description
The cluster config.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cluster_tier: ClusterTierOptional. The cluster tier.
config_bucket: StringOptional. A Cloud Storage bucket used to stage job
dependencies, config files, and job driver console output.
If you do not specify a staging bucket, Cloud
Dataproc will determine a Cloud Storage location (US,
ASIA, or EU) for your cluster’s staging bucket according to the
Compute Engine zone where your cluster is deployed, and then create
and manage this project-level, per-location bucket (see
Dataproc staging and temp
buckets).
This field requires a Cloud Storage bucket name, not a gs://... URI to
a Cloud Storage bucket.
temp_bucket: StringOptional. A Cloud Storage bucket used to store ephemeral cluster and jobs
data, such as Spark and MapReduce history files. If you do not specify a
temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
EU) for your cluster’s temp bucket according to the Compute Engine zone
where your cluster is deployed, and then create and manage this
project-level, per-location bucket. The default bucket has a TTL of 90
days, but you can use any TTL (or none) if you specify a bucket (see
Dataproc staging and temp
buckets).
This field requires a Cloud Storage bucket name, not a gs://... URI to
a Cloud Storage bucket.
gce_cluster_config: Option<GceClusterConfig>Optional. The shared Compute Engine config settings for all instances in a cluster.
master_config: Option<InstanceGroupConfig>Optional. The Compute Engine config settings for the cluster’s master instance.
worker_config: Option<InstanceGroupConfig>Optional. The Compute Engine config settings for the cluster’s worker instances.
secondary_worker_config: Option<InstanceGroupConfig>Optional. The Compute Engine config settings for a cluster’s secondary worker instances
software_config: Option<SoftwareConfig>Optional. The config settings for cluster software.
initialization_actions: Vec<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 ...
fiencryption_config: Option<EncryptionConfig>Optional. Encryption settings for the cluster.
autoscaling_config: Option<AutoscalingConfig>Optional. Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset.
security_config: Option<SecurityConfig>Optional. Security settings for the cluster.
lifecycle_config: Option<LifecycleConfig>Optional. Lifecycle setting for the cluster.
endpoint_config: Option<EndpointConfig>Optional. Port/endpoint configuration for this cluster
metastore_config: Option<MetastoreConfig>Optional. Metastore configuration.
dataproc_metric_config: Option<DataprocMetricConfig>Optional. The config for Dataproc metrics.
auxiliary_node_groups: Vec<AuxiliaryNodeGroup>Optional. The node group settings.
Implementations§
Source§impl ClusterConfig
impl ClusterConfig
pub fn new() -> Self
Sourcepub fn set_cluster_tier<T: Into<ClusterTier>>(self, v: T) -> Self
pub fn set_cluster_tier<T: Into<ClusterTier>>(self, v: T) -> Self
Sets the value of cluster_tier.
Sourcepub fn set_config_bucket<T: Into<String>>(self, v: T) -> Self
pub fn set_config_bucket<T: Into<String>>(self, v: T) -> Self
Sets the value of config_bucket.
Sourcepub fn set_temp_bucket<T: Into<String>>(self, v: T) -> Self
pub fn set_temp_bucket<T: Into<String>>(self, v: T) -> Self
Sets the value of temp_bucket.
Sourcepub fn set_gce_cluster_config<T>(self, v: T) -> Selfwhere
T: Into<GceClusterConfig>,
pub fn set_gce_cluster_config<T>(self, v: T) -> Selfwhere
T: Into<GceClusterConfig>,
Sets the value of gce_cluster_config.
Sourcepub fn set_or_clear_gce_cluster_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<GceClusterConfig>,
pub fn set_or_clear_gce_cluster_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<GceClusterConfig>,
Sets or clears the value of gce_cluster_config.
Sourcepub fn set_master_config<T>(self, v: T) -> Selfwhere
T: Into<InstanceGroupConfig>,
pub fn set_master_config<T>(self, v: T) -> Selfwhere
T: Into<InstanceGroupConfig>,
Sets the value of master_config.
Sourcepub fn set_or_clear_master_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceGroupConfig>,
pub fn set_or_clear_master_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceGroupConfig>,
Sets or clears the value of master_config.
Sourcepub fn set_worker_config<T>(self, v: T) -> Selfwhere
T: Into<InstanceGroupConfig>,
pub fn set_worker_config<T>(self, v: T) -> Selfwhere
T: Into<InstanceGroupConfig>,
Sets the value of worker_config.
Sourcepub fn set_or_clear_worker_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceGroupConfig>,
pub fn set_or_clear_worker_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceGroupConfig>,
Sets or clears the value of worker_config.
Sourcepub fn set_secondary_worker_config<T>(self, v: T) -> Selfwhere
T: Into<InstanceGroupConfig>,
pub fn set_secondary_worker_config<T>(self, v: T) -> Selfwhere
T: Into<InstanceGroupConfig>,
Sets the value of secondary_worker_config.
Sourcepub fn set_or_clear_secondary_worker_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceGroupConfig>,
pub fn set_or_clear_secondary_worker_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceGroupConfig>,
Sets or clears the value of secondary_worker_config.
Sourcepub fn set_software_config<T>(self, v: T) -> Selfwhere
T: Into<SoftwareConfig>,
pub fn set_software_config<T>(self, v: T) -> Selfwhere
T: Into<SoftwareConfig>,
Sets the value of software_config.
Sourcepub fn set_or_clear_software_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SoftwareConfig>,
pub fn set_or_clear_software_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SoftwareConfig>,
Sets or clears the value of software_config.
Sourcepub fn set_initialization_actions<T, V>(self, v: T) -> Self
pub fn set_initialization_actions<T, V>(self, v: T) -> Self
Sets the value of initialization_actions.
Sourcepub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<EncryptionConfig>,
pub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<EncryptionConfig>,
Sets the value of encryption_config.
Sourcepub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionConfig>,
pub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionConfig>,
Sets or clears the value of encryption_config.
Sourcepub fn set_autoscaling_config<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingConfig>,
pub fn set_autoscaling_config<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingConfig>,
Sets the value of autoscaling_config.
Sourcepub fn set_or_clear_autoscaling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingConfig>,
pub fn set_or_clear_autoscaling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingConfig>,
Sets or clears the value of autoscaling_config.
Sourcepub fn set_security_config<T>(self, v: T) -> Selfwhere
T: Into<SecurityConfig>,
pub fn set_security_config<T>(self, v: T) -> Selfwhere
T: Into<SecurityConfig>,
Sets the value of security_config.
Sourcepub fn set_or_clear_security_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityConfig>,
pub fn set_or_clear_security_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityConfig>,
Sets or clears the value of security_config.
Sourcepub fn set_lifecycle_config<T>(self, v: T) -> Selfwhere
T: Into<LifecycleConfig>,
pub fn set_lifecycle_config<T>(self, v: T) -> Selfwhere
T: Into<LifecycleConfig>,
Sets the value of lifecycle_config.
Sourcepub fn set_or_clear_lifecycle_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<LifecycleConfig>,
pub fn set_or_clear_lifecycle_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<LifecycleConfig>,
Sets or clears the value of lifecycle_config.
Sourcepub fn set_endpoint_config<T>(self, v: T) -> Selfwhere
T: Into<EndpointConfig>,
pub fn set_endpoint_config<T>(self, v: T) -> Selfwhere
T: Into<EndpointConfig>,
Sets the value of endpoint_config.
Sourcepub fn set_or_clear_endpoint_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndpointConfig>,
pub fn set_or_clear_endpoint_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndpointConfig>,
Sets or clears the value of endpoint_config.
Sourcepub fn set_metastore_config<T>(self, v: T) -> Selfwhere
T: Into<MetastoreConfig>,
pub fn set_metastore_config<T>(self, v: T) -> Selfwhere
T: Into<MetastoreConfig>,
Sets the value of metastore_config.
Sourcepub fn set_or_clear_metastore_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<MetastoreConfig>,
pub fn set_or_clear_metastore_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<MetastoreConfig>,
Sets or clears the value of metastore_config.
Sourcepub fn set_dataproc_metric_config<T>(self, v: T) -> Selfwhere
T: Into<DataprocMetricConfig>,
pub fn set_dataproc_metric_config<T>(self, v: T) -> Selfwhere
T: Into<DataprocMetricConfig>,
Sets the value of dataproc_metric_config.
Sourcepub fn set_or_clear_dataproc_metric_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<DataprocMetricConfig>,
pub fn set_or_clear_dataproc_metric_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<DataprocMetricConfig>,
Sets or clears the value of dataproc_metric_config.
Sourcepub fn set_auxiliary_node_groups<T, V>(self, v: T) -> Self
pub fn set_auxiliary_node_groups<T, V>(self, v: T) -> Self
Sets the value of auxiliary_node_groups.
Trait Implementations§
Source§impl Clone for ClusterConfig
impl Clone for ClusterConfig
Source§fn clone(&self) -> ClusterConfig
fn clone(&self) -> ClusterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more