Databricks SDK for JavaScript
    Preparing search index...
    Index

    Constructors

    Methods

    • Creates a new Spark cluster. This method will acquire new instances from the cloud provider if necessary. This method is asynchronous; the returned cluster_id can be used to poll the cluster status. When this method returns, the cluster will be in a PENDING state. The cluster will be usable once it enters a RUNNING state. Note: may not be able to acquire some of the requested nodes, due to cloud provider limitations (account limits, spot price, etc.) or transient network issues.

      If acquires at least 85% of the requested on-demand nodes, cluster creation will succeed. Otherwise the cluster will terminate with an informative error message.

      Rather than authoring the cluster's JSON definition from scratch, Databricks recommends filling out the create compute UI and then copying the generated JSON definition from the UI.

      Parameters

      Returns Promise<CreateClusterWaiter>

    • Updates the configuration of a cluster to match the provided attributes and size. A cluster can be updated if it is in a RUNNING or TERMINATED state.

      If a cluster is updated while in a RUNNING state, it will be restarted so that the new attributes can take effect.

      If a cluster is updated while in a TERMINATED state, it will remain TERMINATED. The next time it is started using the clusters/start API, the new attributes will take effect. Any attempt to update a cluster in any other state will be rejected with an INVALID_STATE error code.

      Clusters created by the Databricks Jobs service cannot be edited.

      Parameters

      Returns Promise<EditClusterWaiter>

    • Starts a terminated Spark cluster with the supplied ID. This works similar to createCluster except:

      • The previous cluster id and attributes are preserved.
      • The cluster starts with the last specified cluster size.
      • If the previous cluster was an autoscaling cluster, the current cluster starts with the minimum number of nodes.
      • If the cluster is not currently in a TERMINATED state, nothing will happen.
      • Clusters launched to run a job cannot be started.

      Parameters

      Returns Promise<StartClusterWaiter>

    • Updates the configuration of a cluster to match the partial set of attributes and size. Denote which fields to update using the update_mask field in the request body. A cluster can be updated if it is in a RUNNING or TERMINATED state. If a cluster is updated while in a RUNNING state, it will be restarted so that the new attributes can take effect. If a cluster is updated while in a TERMINATED state, it will remain TERMINATED. The updated attributes will take effect the next time the cluster is started using the clusters/start API. Attempts to update a cluster in any other state will be rejected with an INVALID_STATE error code. Clusters created by the Databricks Jobs service cannot be updated.

      Parameters

      Returns Promise<UpdateClusterWaiter>