-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabricks-cluster-schema.json
More file actions
450 lines (450 loc) · 15.5 KB
/
Copy pathdatabricks-cluster-schema.json
File metadata and controls
450 lines (450 loc) · 15.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/databricks/refs/heads/main/json-schema/databricks-cluster-schema.json",
"title": "Databricks Cluster",
"description": "Schema representing a Databricks cluster, which is a managed cloud resource for running data engineering and data science workloads on Apache Spark. Clusters can be configured with fixed or autoscaling worker counts, various node types, and cloud-provider-specific attributes.",
"type": "object",
"properties": {
"cluster_id": {
"type": "string",
"description": "The unique identifier assigned to the cluster by Databricks. This ID is generated during cluster creation and is used to reference the cluster in all subsequent API calls.",
"examples": ["1234-567890-abcde123"]
},
"cluster_name": {
"type": "string",
"description": "A human-readable name for the cluster. This does not need to be unique within the workspace.",
"examples": ["my-data-cluster"]
},
"spark_version": {
"type": "string",
"description": "The Databricks Runtime version of the cluster, which determines the versions of Apache Spark, Scala, Java, Python, R, and installed libraries. Use the Runtime Versions API to retrieve available versions.",
"examples": ["14.3.x-scala2.12", "15.4.x-scala2.12", "14.3.x-photon-scala2.12"]
},
"node_type_id": {
"type": "string",
"description": "The cloud provider instance type for worker nodes. Determines the compute and memory resources available to each worker.",
"examples": ["i3.xlarge", "Standard_DS3_v2", "n1-standard-4"]
},
"driver_node_type_id": {
"type": ["string", "null"],
"description": "The cloud provider instance type for the Spark driver node. If not specified, defaults to the same value as node_type_id.",
"examples": ["i3.2xlarge"]
},
"num_workers": {
"type": "integer",
"description": "The number of worker nodes in a fixed-size cluster. A cluster has one Spark driver and num_workers executors. Set to 0 for a single-node cluster where the driver acts as both driver and worker.",
"minimum": 0,
"examples": [2, 8]
},
"autoscale": {
"type": ["object", "null"],
"description": "Autoscaling configuration. When set, num_workers is ignored and the cluster dynamically scales between min_workers and max_workers based on workload.",
"properties": {
"min_workers": {
"type": "integer",
"description": "The minimum number of workers the cluster can scale down to when underutilized.",
"minimum": 0
},
"max_workers": {
"type": "integer",
"description": "The maximum number of workers the cluster can scale up to under heavy load.",
"minimum": 1
}
},
"required": ["min_workers", "max_workers"]
},
"state": {
"type": "string",
"description": "The current state of the cluster in its lifecycle.",
"enum": [
"PENDING",
"RUNNING",
"RESTARTING",
"RESIZING",
"TERMINATING",
"TERMINATED",
"ERROR",
"UNKNOWN"
]
},
"state_message": {
"type": "string",
"description": "A human-readable message providing additional information about the current cluster state, such as the reason for termination."
},
"start_time": {
"type": "integer",
"description": "The time when the cluster was started, represented as epoch milliseconds (Unix timestamp in milliseconds).",
"format": "int64"
},
"terminated_time": {
"type": "integer",
"description": "The time when the cluster was terminated, represented as epoch milliseconds.",
"format": "int64"
},
"last_state_loss_time": {
"type": "integer",
"description": "The time when the cluster driver last lost its state, represented as epoch milliseconds. This occurs when the driver node is lost or restarted.",
"format": "int64"
},
"last_activity_time": {
"type": "integer",
"description": "The time of the last user activity on the cluster, used for auto-termination calculations. Represented as epoch milliseconds.",
"format": "int64"
},
"last_restarted_time": {
"type": "integer",
"description": "The time when the cluster was last restarted, represented as epoch milliseconds.",
"format": "int64"
},
"creator_user_name": {
"type": "string",
"description": "The email address of the user who created the cluster.",
"format": "email"
},
"cluster_source": {
"type": "string",
"description": "The source that initiated the creation of this cluster.",
"enum": [
"UI",
"API",
"JOB",
"MODELS",
"PIPELINE",
"PIPELINE_MAINTENANCE",
"SQL",
"SOME_OTHER_SOURCE"
]
},
"spark_conf": {
"type": "object",
"description": "A map of Spark configuration key-value pairs that override the default Spark configuration values for this cluster.",
"additionalProperties": {
"type": "string"
},
"examples": [
{
"spark.databricks.cluster.profile": "serverless",
"spark.speculation": "true"
}
]
},
"custom_tags": {
"type": "object",
"description": "Additional tags applied to the cluster resources. Tags are propagated to the underlying cloud provider instances for cost tracking and resource management.",
"additionalProperties": {
"type": "string"
},
"examples": [
{
"team": "data-engineering",
"environment": "production"
}
]
},
"spark_env_vars": {
"type": "object",
"description": "Environment variables set for all Spark processes running on this cluster. Use the syntax {{secrets/scope/key}} to reference Databricks secrets.",
"additionalProperties": {
"type": "string"
}
},
"autotermination_minutes": {
"type": "integer",
"description": "The number of minutes of inactivity after which the cluster is automatically terminated. A value of 0 disables auto-termination. Default is 120 minutes.",
"minimum": 0,
"default": 120
},
"enable_elastic_disk": {
"type": "boolean",
"description": "Whether autoscaling local storage is enabled. When enabled, Databricks monitors disk usage on Spark workers and automatically attaches additional disks when needed."
},
"instance_pool_id": {
"type": ["string", "null"],
"description": "The ID of the instance pool to use for cluster nodes. Instance pools reduce cluster start time by maintaining idle, ready-to-use instances."
},
"policy_id": {
"type": ["string", "null"],
"description": "The ID of the cluster policy applied to this cluster. Cluster policies constrain configuration settings and enforce organizational governance."
},
"enable_local_disk_encryption": {
"type": "boolean",
"description": "Whether data stored on local disks is encrypted."
},
"data_security_mode": {
"type": "string",
"description": "The data security mode of the cluster, which determines how data access is controlled.",
"enum": [
"NONE",
"SINGLE_USER",
"USER_ISOLATION",
"LEGACY_TABLE_ACL",
"LEGACY_PASSTHROUGH",
"LEGACY_SINGLE_USER",
"LEGACY_SINGLE_USER_STANDARD"
]
},
"single_user_name": {
"type": ["string", "null"],
"description": "The user name (email) of the single user when data_security_mode is SINGLE_USER.",
"format": "email"
},
"runtime_engine": {
"type": "string",
"description": "The runtime engine to use. PHOTON enables the Photon vectorized query engine for significantly faster performance on SQL and DataFrame workloads.",
"enum": ["STANDARD", "PHOTON"]
},
"aws_attributes": {
"type": ["object", "null"],
"description": "AWS-specific attributes for clusters running on Amazon Web Services.",
"properties": {
"first_on_demand": {
"type": "integer",
"description": "The number of nodes to place on on-demand instances before using spot instances."
},
"availability": {
"type": "string",
"enum": ["SPOT", "ON_DEMAND", "SPOT_WITH_FALLBACK"],
"description": "The availability type for the cluster instances."
},
"zone_id": {
"type": "string",
"description": "The AWS availability zone identifier."
},
"instance_profile_arn": {
"type": "string",
"description": "The IAM instance profile ARN for the cluster EC2 instances."
},
"spot_bid_price_percent": {
"type": "integer",
"description": "The max bid price for spot instances as a percentage of the on-demand price.",
"minimum": 1,
"maximum": 10000
},
"ebs_volume_type": {
"type": "string",
"enum": ["GENERAL_PURPOSE_SSD", "THROUGHPUT_OPTIMIZED_HDD"]
},
"ebs_volume_count": {
"type": "integer",
"minimum": 0
},
"ebs_volume_size": {
"type": "integer",
"description": "The size of each EBS volume in GiB."
}
}
},
"azure_attributes": {
"type": ["object", "null"],
"description": "Azure-specific attributes for clusters running on Microsoft Azure.",
"properties": {
"first_on_demand": {
"type": "integer"
},
"availability": {
"type": "string",
"enum": ["SPOT_AZURE", "ON_DEMAND_AZURE", "SPOT_WITH_FALLBACK_AZURE"]
},
"spot_bid_max_price": {
"type": "number",
"description": "The max bid price for Azure spot instances. -1 means the price is up to the on-demand price."
}
}
},
"gcp_attributes": {
"type": ["object", "null"],
"description": "GCP-specific attributes for clusters running on Google Cloud Platform.",
"properties": {
"use_preemptible_executors": {
"type": "boolean"
},
"google_service_account": {
"type": "string"
},
"availability": {
"type": "string",
"enum": ["GCP_PREEMPTIBLE", "GCP_ON_DEMAND"]
}
}
},
"init_scripts": {
"type": "array",
"description": "Initialization scripts that run on each node when the cluster starts. Scripts can be stored in workspace files, Unity Catalog volumes, or DBFS.",
"items": {
"type": "object",
"properties": {
"workspace": {
"type": "object",
"properties": {
"destination": {
"type": "string",
"description": "Workspace file path of the init script."
}
}
},
"volumes": {
"type": "object",
"properties": {
"destination": {
"type": "string",
"description": "Unity Catalog volume path of the init script."
}
}
},
"dbfs": {
"type": "object",
"properties": {
"destination": {
"type": "string",
"description": "DBFS path of the init script (deprecated)."
}
},
"deprecated": true
}
}
}
},
"default_tags": {
"type": "object",
"description": "Default tags automatically applied by Databricks, including Vendor, Creator, ClusterName, and ClusterId.",
"additionalProperties": {
"type": "string"
}
},
"termination_reason": {
"type": ["object", "null"],
"description": "The reason the cluster was terminated, including error codes and parameters.",
"properties": {
"code": {
"type": "string",
"description": "A machine-readable code indicating the termination reason."
},
"type": {
"type": "string",
"description": "The type of termination (e.g., CLIENT_ERROR, CLOUD_FAILURE)."
},
"parameters": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Additional parameters providing details about the termination."
}
}
},
"driver": {
"type": ["object", "null"],
"description": "Information about the Spark driver node.",
"properties": {
"private_ip": {
"type": "string",
"description": "The private IP address of the driver node."
},
"public_dns": {
"type": "string",
"description": "The public DNS name of the driver node."
},
"node_id": {
"type": "string",
"description": "The Databricks node identifier."
},
"instance_id": {
"type": "string",
"description": "The cloud provider instance ID."
},
"start_timestamp": {
"type": "integer",
"format": "int64"
},
"host_private_ip": {
"type": "string"
}
}
},
"executors": {
"type": "array",
"description": "Information about the Spark executor (worker) nodes.",
"items": {
"type": "object",
"properties": {
"private_ip": {
"type": "string"
},
"public_dns": {
"type": "string"
},
"node_id": {
"type": "string"
},
"instance_id": {
"type": "string"
},
"start_timestamp": {
"type": "integer",
"format": "int64"
},
"host_private_ip": {
"type": "string"
}
}
}
},
"jdbc_port": {
"type": "integer",
"description": "The port number on the driver node that serves JDBC/ODBC connections."
},
"spark_context_id": {
"type": "integer",
"description": "The canonical Spark context identifier for this cluster.",
"format": "int64"
},
"ssh_public_keys": {
"type": "array",
"description": "SSH public keys added to each Spark node in this cluster for SSH access.",
"items": {
"type": "string"
}
},
"disk_spec": {
"type": ["object", "null"],
"description": "Disk specifications for the cluster nodes.",
"properties": {
"disk_count": {
"type": "integer",
"description": "The number of disks attached to each node."
},
"disk_size": {
"type": "integer",
"description": "The size of each disk in GiB."
},
"disk_type": {
"type": "object",
"properties": {
"azure_disk_volume_type": {
"type": "string"
},
"ebs_volume_type": {
"type": "string"
}
}
}
}
},
"cluster_log_status": {
"type": ["object", "null"],
"description": "Status of cluster log delivery.",
"properties": {
"last_attempted": {
"type": "integer",
"format": "int64",
"description": "The timestamp of the last log delivery attempt."
},
"last_exception": {
"type": "string",
"description": "The exception message if the last delivery attempt failed."
}
}
}
},
"required": ["cluster_name", "spark_version", "node_type_id"]
}