-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demonstrate how to use a development cluster
Note: this requires databricks/cli#1698.
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Development cluster | ||
|
||
(tbd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
bundle: | ||
name: development_cluster | ||
|
||
include: | ||
- resources/*.yml | ||
|
||
workspace: | ||
host: https://e2-dogfood.staging.cloud.databricks.com | ||
|
||
targets: | ||
dev: | ||
mode: development | ||
default: true | ||
|
||
# By configuring this field for the "dev" target, all jobs in this bundle | ||
# are overridden to use the all-purpose cluster defined below. | ||
# | ||
# This can increase the speed of development when iterating on code and job definitions, | ||
# as you don't have to wait for job clusters to start for every job run. | ||
# | ||
# Note: make sure that the cluster configuration below matches the job cluster | ||
# definition that will be used when deploying the other targets. | ||
cluster_id: ${resources.clusters.development_cluster.id} | ||
|
||
resources: | ||
clusters: | ||
development_cluster: | ||
cluster_name: Development cluster | ||
spark_version: 15.4.x-scala2.12 | ||
node_type_id: i3.xlarge | ||
num_workers: 0 | ||
autotermination_minutes: 30 | ||
spark_conf: | ||
"spark.databricks.cluster.profile": "singleNode" | ||
"spark.master": "local[*, 4]" | ||
custom_tags: | ||
"ResourceClass": "SingleNode" |
22 changes: 22 additions & 0 deletions
22
knowledge_base/development_cluster/resources/example_job.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
resources: | ||
jobs: | ||
example_job: | ||
name: "Example job to demonstrate using an interactive cluster for development" | ||
|
||
tasks: | ||
- task_key: notebook | ||
job_cluster_key: cluster | ||
notebook_task: | ||
notebook_path: ../src/hello.py | ||
|
||
job_clusters: | ||
- job_cluster_key: cluster | ||
new_cluster: | ||
spark_version: 15.4.x-scala2.12 | ||
node_type_id: i3.xlarge | ||
num_workers: 0 | ||
spark_conf: | ||
"spark.databricks.cluster.profile": "singleNode" | ||
"spark.master": "local[*, 4]" | ||
custom_tags: | ||
"ResourceClass": "SingleNode" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Databricks notebook source | ||
|
||
print("Hello, World!") |