Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

Latest commit

 

History

History
423 lines (245 loc) · 18.5 KB

File metadata and controls

423 lines (245 loc) · 18.5 KB

Databricks::Clusters::Cluster

Manage a Databricks Cluster

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{
    "Type" : "Databricks::Clusters::Cluster",
    "Properties" : {
        "NumWorkers" : Integer,
        "Autoscale" : Autoscale,
        "ClusterName" : String,
        "SparkVersion" : String,
        "SparkConf" : Map,
        "AwsAttributes" : AwsAttributes,
        "NodeTypeId" : String,
        "DriverNodeTypeId" : String,
        "SshPublicKeys" : [ String, ... ],
        "CustomTags" : Map,
        "InitScripts" : [ InitScriptsListItem, ... ],
        "SparkEnvVars" : Map,
        "AutoterminationMinutes" : Integer,
        "EnableElasticDisk" : Boolean,
        "DriverInstancePoolId" : String,
        "InstancePoolId" : String,
        "IdempotencyToken" : String,
        "ApplyPolicyDefaultValues" : Boolean,
        "EnableLocalDiskEncryption" : Boolean,
        "RuntimeEngine" : String,
        "ClusterMemoryMb" : Integer,
        "ClusterCores" : Integer,
        "InstanceSource" : InstanceSource,
        "Driver" : Map,
        "DriverInstanceSource" : DriverInstanceSource,
        "ClusterSource" : String,
        "CreatorUserName" : String,
        "DefaultTags" : DefaultTags,
        "EffectiveSparkVersion" : String,
        "StartTime" : Double,
    }
}

YAML

Type: Databricks::Clusters::Cluster
Properties:
    NumWorkers: Integer
    Autoscale: Autoscale
    ClusterName: String
    SparkVersion: String
    SparkConf: Map
    AwsAttributes: AwsAttributes
    NodeTypeId: String
    DriverNodeTypeId: String
    SshPublicKeys: 
      - String
    CustomTags: Map
    InitScripts: 
      - InitScriptsListItem
    SparkEnvVars: Map
    AutoterminationMinutes: Integer
    EnableElasticDisk: Boolean
    DriverInstancePoolId: String
    InstancePoolId: String
    IdempotencyToken: String
    ApplyPolicyDefaultValues: Boolean
    EnableLocalDiskEncryption: Boolean
    RuntimeEngine: String
    ClusterMemoryMb: Integer
    ClusterCores: Integer
    InstanceSource: InstanceSource
    Driver: Map
    DriverInstanceSource: DriverInstanceSource
    ClusterSource: String
    CreatorUserName: String
    DefaultTags: DefaultTags
    EffectiveSparkVersion: String
    StartTime: Double

Properties

NumWorkers

If num_workers, number of worker nodes that this cluster should have. A cluster has one Spark driver and num_workers executors for a total of num_workers + 1 Spark nodes.

Required: No

Type: Integer

Update requires: No interruption

Autoscale

Range defining the min and max number of cluster workers

Required: No

Type: Autoscale

Update requires: No interruption

ClusterName

Cluster name requested by the user. This doesn't have to be unique. If not specified at creation, the cluster name will be an empty string.

Required: No

Type: String

Update requires: No interruption

SparkVersion

The runtime version of the cluster. You can retrieve a list of available runtime versions by using the Runtime versions API call. This field is required.

Required: No

Type: String

Update requires: No interruption

SparkConf

An object containing a set of optional, user-specified Spark configuration key-value pairs. You can also pass in a string of extra JVM options to the driver and the executors via spark.driver.extraJavaOptions and spark.executor.extraJavaOptions respectively. Example Spark confs: {"spark.speculation": true, "spark.streaming.ui.retainedBatches": 5} or {"spark.driver.extraJavaOptions": "-verbose:gc -XX:+PrintGCDetails"}

Required: No

Type: Map

Update requires: No interruption

AwsAttributes

Attributes set during cluster creation related to Amazon Web Services.

Required: No

Type: AwsAttributes

Update requires: No interruption

NodeTypeId

This field encodes, through a single value, the resources available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or compute intensive workloads A list of available node types can be retrieved by using the List node types API call. This field is required.

Required: No

Type: String

Update requires: No interruption

DriverNodeTypeId

The node type of the Spark driver. This field is optional; if unset, the driver node type will be set as the same value as node_type_id defined above.

Required: No

Type: String

Update requires: No interruption

SshPublicKeys

SSH public key contents that will be added to each Spark node in this cluster. The corresponding private keys can be used to login with the user name ubuntu on port 2200. Up to 10 keys can be specified.

Required: No

Type: List of String

Update requires: No interruption

CustomTags

An object containing a set of tags for cluster resources. Databricks tags all cluster resources (such as AWS instances and EBS volumes) with these tags in addition to default_tags.

Required: No

Type: Map

Update requires: No interruption

InitScripts

The configuration for storing init scripts. Any number of destinations can be specified. The scripts are executed sequentially in the order provided. If cluster_log_conf is specified, init script logs are sent to //init_scripts.

Required: No

Type: List of InitScriptsListItem

Update requires: No interruption

SparkEnvVars

An object containing a set of optional, user-specified environment variable key-value pairs. Key-value pairs of the form (X,Y) are exported as is (that is, export X='Y') while launching the driver and workers. In order to specify an additional set of SPARK_DAEMON_JAVA_OPTS, we recommend appending them to $SPARK_DAEMON_JAVA_OPTS as shown in the following example. This ensures that all default Databricks managed environmental variables are included as well. Example Spark environment variables: {"SPARK_WORKER_MEMORY": "28000m", "SPARK_LOCAL_DIRS": "/local_disk0"} or {"SPARK_DAEMON_JAVA_OPTS": "$SPARK_DAEMON_JAVA_OPTS

Required: No

Type: Map

Update requires: No interruption

AutoterminationMinutes

Automatically terminates the cluster after it is inactive for this time in minutes. If not set, this cluster will not be automatically terminated. If specified, the threshold must be between 10 and 10000 minutes. You can also set this value to 0 to explicitly disable

Required: No

Type: Integer

Update requires: No interruption

EnableElasticDisk

Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space. This feature requires specific AWS permissions to function correctly - refer to Autoscaling local storage for details.

Required: No

Type: Boolean

Update requires: No interruption

DriverInstancePoolId

The optional ID of the instance pool to use for the driver node. You must also specify instance_pool_id. Refer to Instance Pools API 2.0 for details.

Required: No

Type: String

Update requires: No interruption

InstancePoolId

The optional ID of the instance pool to use for cluster nodes. If driver_instance_pool_id is present, instance_pool_id is used for worker nodes only. Otherwise, it is used for both the driver and worker nodes. Refer to Instance Pools API 2.0 for details.

Required: No

Type: String

Update requires: No interruption

IdempotencyToken

An optional token that can be used to guarantee the idempotency of cluster creation requests. If the idempotency token is assigned to a cluster that is not in the TERMINATED state, the request does not create a new cluster but instead returns the ID of the existing cluster. Otherwise, a new cluster is created. The idempotency token is cleared when the cluster is terminated

If you specify the idempotency token, upon failure you can retry until the request succeeds. Databricks guarantees that exactly one cluster will be launched with that idempotency token.

This token should have at most 64 characters.

Required: No

Type: String

Update requires: No interruption

ApplyPolicyDefaultValues

Whether to use policy default values for missing cluster attributes.

Required: No

Type: Boolean

Update requires: No interruption

EnableLocalDiskEncryption

Whether encryption of disks locally attached to the cluster is enabled.

Required: No

Type: Boolean

Update requires: No interruption

RuntimeEngine

The type of runtime engine to use. If not specified, the runtime engine type is inferred based on the spark_version value. Allowed values include:

PHOTON: Use the Photon runtime engine type.

STANDARD: Use the standard runtime engine type.

This field is optional.

Required: No

Type: String

Update requires: No interruption

ClusterMemoryMb

Required: No

Type: Integer

Update requires: No interruption

ClusterCores

Required: No

Type: Integer

Update requires: No interruption

InstanceSource

Required: No

Type: InstanceSource

Update requires: No interruption

Driver

Required: No

Type: Map

Update requires: No interruption

DriverInstanceSource

Required: No

Type: DriverInstanceSource

Update requires: No interruption

ClusterSource

Required: No

Type: String

Update requires: No interruption

CreatorUserName

Required: No

Type: String

Update requires: No interruption

DefaultTags

Required: No

Type: DefaultTags

Update requires: No interruption

EffectiveSparkVersion

Required: No

Type: String

Update requires: No interruption

StartTime

Required: No

Type: Double

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ClusterId.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

ClusterId

Canonical identifier for the cluster

State

The state of the cluster.

StateMessage

The state of the cluster.

LastStateLossTime

Returns the LastStateLossTime value.

LastActivityTime

Returns the LastActivityTime value.

LastRestartedTime

Returns the LastRestartedTime value.

InitScriptsSafeMode

Returns the InitScriptsSafeMode value.