Clusters
Use and configure compute for Databricks
List Events GA
POST
Retrieves a list of events about the activity of a cluster. This API is paginated. If there are more events to read, the response includes all the parameters necessary to request the next page of events.
API scopes: clusters
Request body
- cluster_idstring
The ID of the cluster to retrieve events about.
- start_timeint64
The start time in epoch milliseconds. If empty, returns events starting from the beginning of time.
- end_timeint64
The end time in epoch milliseconds. If empty, returns events up to the current time.
- orderstring
The order to list events in; either "ASC" or "DESC". Defaults to "DESC".
- event_typesarray of string
An optional set of event types to filter on. If empty, all event types are returned.
- offsetint64
Deprecated: use page_token in combination with page_size instead.
The offset in the result set. Defaults to 0 (no offset). When an offset is specified and the results are requested in descending order, the end_time field is required.
- limitint64
Deprecated: use page_token in combination with page_size instead.
The maximum number of events to include in a page of events. Defaults to 50, and maximum allowed value is 500.
- page_tokenstring
Use next_page_token or prev_page_token returned from the previous request to list the next or previous page of events respectively. If page_token is empty, the first page is returned.
- page_sizeint32
The maximum number of events to include in a page of events. The server may further constrain the maximum number of results returned in a single page. If the page_size is empty or 0, the server will decide the number of results to be returned. The field has to be in the range [0,500]. If the value is outside the range, the server enforces 0 or 500.
Response
- eventsarray of object
Show child attributesHide child attributes
- cluster_idstring
- timestampint64
The timestamp when the event occurred, stored as the number of milliseconds since the Unix epoch. If not provided, this will be assigned by the Timeline service.
- typestring
- detailsobject
Show child attributesHide child attributes
- current_num_workersint32
The current number of nodes in the cluster.
- target_num_workersint32
The targeted number of nodes in the cluster.
- previous_attributesobject
The cluster attributes before a cluster was edited.
Show child attributesHide child attributes
- cluster_namestring
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. For job clusters, the cluster name is automatically set based on the job and job run IDs.
- spark_versionstring
The Spark version of the cluster, e.g.
3.3.x-scala2.11. A list of available Spark versions can be retrieved by using the clusters/sparkVersions API call.
- spark_confobject
An object containing a set of optional, user-specified Spark configuration key-value pairs. Users can also pass in a string of extra JVM options to the driver and the executors via
spark.driver.extraJavaOptionsandspark.executor.extraJavaOptionsrespectively.
- aws_attributesobject
Attributes related to clusters running on Amazon Web Services. If not specified at cluster creation, a set of default values will be used.
- azure_attributesobject
Attributes related to clusters running on Microsoft Azure. If not specified at cluster creation, a set of default values will be used.
- gcp_attributesobject
Attributes related to clusters running on Google Cloud Platform. If not specified at cluster creation, a set of default values will be used.
- node_type_idstring
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 clusters/listNodeTypes API call.
- driver_node_type_idstring
The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as
node_type_iddefined above.This field, along with node_type_id, should not be set if virtual_cluster_size is set. If both driver_node_type_id, node_type_id, and virtual_cluster_size are specified, driver_node_type_id and node_type_id take precedence.
- worker_node_type_flexibilityobject
Flexible node type configuration for worker nodes.
- driver_node_type_flexibilityobject
Flexible node type configuration for the driver node.
- ssh_public_keysarray of string
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
ubuntuon port2200. Up to 10 keys can be specified.
- custom_tagsobject
Additional tags for cluster resources. <Databricks> will tag all cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to
default_tags. Notes:-
Currently, <Databricks> allows at most 45 custom tags
-
Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags
-
- cluster_log_confobject
The configuration for delivering spark logs to a long-term storage destination. Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every
5 mins. The destination of driver logs is$destination/$clusterId/driver, while the destination of executor logs is$destination/$clusterId/executor.
- spark_env_varsobject
An object containing a set of optional, user-specified environment variable key-value pairs. Please note that key-value pair of the form (X,Y) will be exported as is (i.e.,
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_OPTSas shown in the example below. 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 -Dspark.shuffle.service.enabled=true"}
- autotermination_minutesint32
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. Users can also set this value to 0 to explicitly disable automatic termination.
- enable_elastic_diskboolean
Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space.
AWSAutoscaling 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 the User Guide for more details.
- init_scriptsarray of object
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_confis specified, init script logs are sent to<destination>/<cluster-ID>/init_scripts.
- docker_imageobject
Custom docker image BYOC
- instance_pool_idstring
The optional ID of the instance pool to which the cluster belongs.
- single_user_namestring
Single user name if data_security_mode is
SINGLE_USER
- policy_idstring
The ID of the cluster policy used to create the cluster if applicable.
- enable_local_disk_encryptionboolean
Whether to enable LUKS on cluster VMs' local disks
- driver_instance_pool_idstring
The optional ID of the instance pool for the driver of the cluster belongs. The pool cluster uses the instance pool with id (instance_pool_id) if the driver pool is not assigned.
- workload_typeobject
- data_security_modestring
- runtime_enginestring
Determines the cluster's runtime engine, either standard or Photon.
This field is not compatible with legacy
spark_versionvalues that contain-photon-. Remove-photon-from thespark_versionand setruntime_enginetoPHOTON.If left unspecified, the runtime engine defaults to standard unless the spark_version contains -photon-, in which case Photon will be used.
- kindstring
- use_ml_runtimeboolean
This field can only be used when
kind = CLASSIC_PREVIEW.effective_spark_versionis determined byspark_version(DBR release), this fielduse_ml_runtime, and whethernode_type_idis gpu node or not.
- is_single_nodeboolean
This field can only be used when
kind = CLASSIC_PREVIEW.When set to true, <Databricks> will automatically set single node related
custom_tags,spark_conf, andnum_workers
- remote_disk_throughputint32
If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks.
- total_initial_remote_disk_sizeint32
If set, what the total initial volume size (in GB) of the remote disks should be. Supported for GCP.
- dependency_modestringBeta
Controls dependency configuration for the cluster.
- attributesobject
- For created clusters, the attributes of the cluster.
- For edited clusters, the new attributes of the cluster.
Show child attributesHide child attributes
- cluster_namestring
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. For job clusters, the cluster name is automatically set based on the job and job run IDs.
- spark_versionstring
The Spark version of the cluster, e.g.
3.3.x-scala2.11. A list of available Spark versions can be retrieved by using the clusters/sparkVersions API call.
- spark_confobject
An object containing a set of optional, user-specified Spark configuration key-value pairs. Users can also pass in a string of extra JVM options to the driver and the executors via
spark.driver.extraJavaOptionsandspark.executor.extraJavaOptionsrespectively.
- aws_attributesobject
Attributes related to clusters running on Amazon Web Services. If not specified at cluster creation, a set of default values will be used.
- azure_attributesobject
Attributes related to clusters running on Microsoft Azure. If not specified at cluster creation, a set of default values will be used.
- gcp_attributesobject
Attributes related to clusters running on Google Cloud Platform. If not specified at cluster creation, a set of default values will be used.
- node_type_idstring
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 clusters/listNodeTypes API call.
- driver_node_type_idstring
The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as
node_type_iddefined above.This field, along with node_type_id, should not be set if virtual_cluster_size is set. If both driver_node_type_id, node_type_id, and virtual_cluster_size are specified, driver_node_type_id and node_type_id take precedence.
- worker_node_type_flexibilityobject
Flexible node type configuration for worker nodes.
- driver_node_type_flexibilityobject
Flexible node type configuration for the driver node.
- ssh_public_keysarray of string
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
ubuntuon port2200. Up to 10 keys can be specified.
- custom_tagsobject
Additional tags for cluster resources. <Databricks> will tag all cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to
default_tags. Notes:-
Currently, <Databricks> allows at most 45 custom tags
-
Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags
-
- cluster_log_confobject
The configuration for delivering spark logs to a long-term storage destination. Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every
5 mins. The destination of driver logs is$destination/$clusterId/driver, while the destination of executor logs is$destination/$clusterId/executor.
- spark_env_varsobject
An object containing a set of optional, user-specified environment variable key-value pairs. Please note that key-value pair of the form (X,Y) will be exported as is (i.e.,
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_OPTSas shown in the example below. 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 -Dspark.shuffle.service.enabled=true"}
- autotermination_minutesint32
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. Users can also set this value to 0 to explicitly disable automatic termination.
- enable_elastic_diskboolean
Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space.
AWSAutoscaling 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 the User Guide for more details.
- init_scriptsarray of object
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_confis specified, init script logs are sent to<destination>/<cluster-ID>/init_scripts.
- docker_imageobject
Custom docker image BYOC
- instance_pool_idstring
The optional ID of the instance pool to which the cluster belongs.
- single_user_namestring
Single user name if data_security_mode is
SINGLE_USER
- policy_idstring
The ID of the cluster policy used to create the cluster if applicable.
- enable_local_disk_encryptionboolean
Whether to enable LUKS on cluster VMs' local disks
- driver_instance_pool_idstring
The optional ID of the instance pool for the driver of the cluster belongs. The pool cluster uses the instance pool with id (instance_pool_id) if the driver pool is not assigned.
- workload_typeobject
- data_security_modestring
- runtime_enginestring
Determines the cluster's runtime engine, either standard or Photon.
This field is not compatible with legacy
spark_versionvalues that contain-photon-. Remove-photon-from thespark_versionand setruntime_enginetoPHOTON.If left unspecified, the runtime engine defaults to standard unless the spark_version contains -photon-, in which case Photon will be used.
- kindstring
- use_ml_runtimeboolean
This field can only be used when
kind = CLASSIC_PREVIEW.effective_spark_versionis determined byspark_version(DBR release), this fielduse_ml_runtime, and whethernode_type_idis gpu node or not.
- is_single_nodeboolean
This field can only be used when
kind = CLASSIC_PREVIEW.When set to true, <Databricks> will automatically set single node related
custom_tags,spark_conf, andnum_workers
- remote_disk_throughputint32
If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks.
- total_initial_remote_disk_sizeint32
If set, what the total initial volume size (in GB) of the remote disks should be. Supported for GCP.
- dependency_modestringBeta
Controls dependency configuration for the cluster.
- previous_cluster_sizeobject
The size of the cluster before an edit or resize.
Show child attributesHide child attributes
- num_workersint32Required
Number of worker nodes that this cluster should have. A cluster has one Spark Driver and
num_workersExecutors for a total ofnum_workers+ 1 Spark nodes.Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in
spark_infowill gradually increase from 5 to 10 as the new nodes are provisioned.
- autoscaleobjectRequired
Parameters needed in order to automatically scale clusters up and down based on load. Note: autoscaling works best with DB runtime versions 3.0 or later.
- cluster_sizeobject
The actual cluster size that was set in the cluster creation or edit.
Show child attributesHide child attributes
- num_workersint32Required
Number of worker nodes that this cluster should have. A cluster has one Spark Driver and
num_workersExecutors for a total ofnum_workers+ 1 Spark nodes.Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in
spark_infowill gradually increase from 5 to 10 as the new nodes are provisioned.
- autoscaleobjectRequired
Parameters needed in order to automatically scale clusters up and down based on load. Note: autoscaling works best with DB runtime versions 3.0 or later.
- causestring
The cause of a change in target size.
- reasonobject
A termination reason:
- On a TERMINATED event, this is the reason of the termination.
- On a RESIZE_COMPLETE event, this indicates the reason that we failed to acquire some nodes.
Show child attributesHide child attributes
- codestring
status code indicating why the cluster was terminated
- typestring
type of the termination
- parametersobject
list of parameters that provide additional information about why the cluster was terminated
- userstring
The user that caused the event to occur. (Empty if it was done by the control plane.)
- previous_disk_sizeint64
Previous disk size in bytes
- disk_sizeint64
Current disk size in bytes
- free_spaceint64
- instance_idstring
Instance Id where the event originated from
- did_not_expand_reasonstring
- driver_state_messagestring
More details about the change in driver's state
- job_run_namestring
Unique identifier of the specific job run associated with this cluster event
- For clusters created for jobs, this will be the same as the cluster name
- init_scriptsobject
List of global and cluster init scripts associated with this cluster event.
Show child attributesHide child attributes
- reported_for_nodestring
The private ip of the node we are reporting init script execution details for (we will select the execution details from only one node rather than reporting the execution details from every node to keep these event details small)
This should only be defined for the INIT_SCRIPTS_FINISHED event
- globalarray of object
The global init scripts associated with this cluster event.
- clusterarray of object
The cluster scoped init scripts associated with this cluster event.
- enable_termination_for_node_blocklistedboolean
Whether or not a blocklisted node should be terminated. For ClusterEventType NODE_BLACKLISTED.
- current_num_vcpusint32
The current number of vCPUs in the cluster.
- target_num_vcpusint32
The targeted number of vCPUs in the cluster.
- data_plane_event_detailsobject
Show child attributesHide child attributes
- event_typestring
- timestampint64
- host_idstring
- executor_failuresint32
- next_pageobject
Deprecated: use next_page_token or prev_page_token instead.
The parameters required to retrieve the next page of events. Omitted if there are no more events to read.
Show child attributesHide child attributes
- cluster_idstring
The ID of the cluster to retrieve events about.
- start_timeint64
The start time in epoch milliseconds. If empty, returns events starting from the beginning of time.
- end_timeint64
The end time in epoch milliseconds. If empty, returns events up to the current time.
- orderstring
The order to list events in; either "ASC" or "DESC". Defaults to "DESC".
- event_typesarray of string
An optional set of event types to filter on. If empty, all event types are returned.
- offsetint64
Deprecated: use page_token in combination with page_size instead.
The offset in the result set. Defaults to 0 (no offset). When an offset is specified and the results are requested in descending order, the end_time field is required.
- limitint64
Deprecated: use page_token in combination with page_size instead.
The maximum number of events to include in a page of events. Defaults to 50, and maximum allowed value is 500.
- page_tokenstring
Use next_page_token or prev_page_token returned from the previous request to list the next or previous page of events respectively. If page_token is empty, the first page is returned.
- page_sizeint32
The maximum number of events to include in a page of events. The server may further constrain the maximum number of results returned in a single page. If the page_size is empty or 0, the server will decide the number of results to be returned. The field has to be in the range [0,500]. If the value is outside the range, the server enforces 0 or 500.
- total_countint64
Deprecated: Returns 0 when request uses page_token. Will start returning zero when request uses offset/limit soon.
The total number of events filtered by the start_time, end_time, and event_types.
- next_page_tokenstring
This field represents the pagination token to retrieve the next page of results. If the value is "", it means no further results for the request.
- prev_page_tokenstring
This field represents the pagination token to retrieve the previous page of results. If the value is "", it means no further results for the request.