#[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.
§Example
use google_cloud_dataproc_v1::model::cluster_config::ClusterTier;
let x0 = ClusterConfig::new().set_cluster_tier(ClusterTier::Standard);
let x1 = ClusterConfig::new().set_cluster_tier(ClusterTier::Premium);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.
§Example
let x = ClusterConfig::new().set_config_bucket("example");Sourcepub fn set_temp_bucket<T: Into<String>>(self, v: T) -> Self
pub fn set_temp_bucket<T: Into<String>>(self, v: T) -> Self
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.
§Example
use google_cloud_dataproc_v1::model::GceClusterConfig;
let x = ClusterConfig::new().set_gce_cluster_config(GceClusterConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::GceClusterConfig;
let x = ClusterConfig::new().set_or_clear_gce_cluster_config(Some(GceClusterConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_gce_cluster_config(None::<GceClusterConfig>);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.
§Example
use google_cloud_dataproc_v1::model::InstanceGroupConfig;
let x = ClusterConfig::new().set_master_config(InstanceGroupConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::InstanceGroupConfig;
let x = ClusterConfig::new().set_or_clear_master_config(Some(InstanceGroupConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_master_config(None::<InstanceGroupConfig>);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.
§Example
use google_cloud_dataproc_v1::model::InstanceGroupConfig;
let x = ClusterConfig::new().set_worker_config(InstanceGroupConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::InstanceGroupConfig;
let x = ClusterConfig::new().set_or_clear_worker_config(Some(InstanceGroupConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_worker_config(None::<InstanceGroupConfig>);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.
§Example
use google_cloud_dataproc_v1::model::InstanceGroupConfig;
let x = ClusterConfig::new().set_secondary_worker_config(InstanceGroupConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::InstanceGroupConfig;
let x = ClusterConfig::new().set_or_clear_secondary_worker_config(Some(InstanceGroupConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_secondary_worker_config(None::<InstanceGroupConfig>);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.
§Example
use google_cloud_dataproc_v1::model::SoftwareConfig;
let x = ClusterConfig::new().set_software_config(SoftwareConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::SoftwareConfig;
let x = ClusterConfig::new().set_or_clear_software_config(Some(SoftwareConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_software_config(None::<SoftwareConfig>);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.
§Example
use google_cloud_dataproc_v1::model::NodeInitializationAction;
let x = ClusterConfig::new()
.set_initialization_actions([
NodeInitializationAction::default()/* use setters */,
NodeInitializationAction::default()/* use (different) setters */,
]);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.
§Example
use google_cloud_dataproc_v1::model::EncryptionConfig;
let x = ClusterConfig::new().set_encryption_config(EncryptionConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::EncryptionConfig;
let x = ClusterConfig::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_encryption_config(None::<EncryptionConfig>);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.
§Example
use google_cloud_dataproc_v1::model::AutoscalingConfig;
let x = ClusterConfig::new().set_autoscaling_config(AutoscalingConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::AutoscalingConfig;
let x = ClusterConfig::new().set_or_clear_autoscaling_config(Some(AutoscalingConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_autoscaling_config(None::<AutoscalingConfig>);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.
§Example
use google_cloud_dataproc_v1::model::SecurityConfig;
let x = ClusterConfig::new().set_security_config(SecurityConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::SecurityConfig;
let x = ClusterConfig::new().set_or_clear_security_config(Some(SecurityConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_security_config(None::<SecurityConfig>);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.
§Example
use google_cloud_dataproc_v1::model::LifecycleConfig;
let x = ClusterConfig::new().set_lifecycle_config(LifecycleConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::LifecycleConfig;
let x = ClusterConfig::new().set_or_clear_lifecycle_config(Some(LifecycleConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_lifecycle_config(None::<LifecycleConfig>);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.
§Example
use google_cloud_dataproc_v1::model::EndpointConfig;
let x = ClusterConfig::new().set_endpoint_config(EndpointConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::EndpointConfig;
let x = ClusterConfig::new().set_or_clear_endpoint_config(Some(EndpointConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_endpoint_config(None::<EndpointConfig>);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.
§Example
use google_cloud_dataproc_v1::model::MetastoreConfig;
let x = ClusterConfig::new().set_metastore_config(MetastoreConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::MetastoreConfig;
let x = ClusterConfig::new().set_or_clear_metastore_config(Some(MetastoreConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_metastore_config(None::<MetastoreConfig>);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.
§Example
use google_cloud_dataproc_v1::model::DataprocMetricConfig;
let x = ClusterConfig::new().set_dataproc_metric_config(DataprocMetricConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::DataprocMetricConfig;
let x = ClusterConfig::new().set_or_clear_dataproc_metric_config(Some(DataprocMetricConfig::default()/* use setters */));
let x = ClusterConfig::new().set_or_clear_dataproc_metric_config(None::<DataprocMetricConfig>);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.
§Example
use google_cloud_dataproc_v1::model::AuxiliaryNodeGroup;
let x = ClusterConfig::new()
.set_auxiliary_node_groups([
AuxiliaryNodeGroup::default()/* use setters */,
AuxiliaryNodeGroup::default()/* use (different) setters */,
]);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