You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
7
7
### Added
8
8
9
9
- BREAKING: Add required CLI argument and env var to set the image repository used to construct final product image names: `IMAGE_REPOSITORY` (`--image-repository`), eg. `oci.example.org/my/namespace` ([#684]).
10
+
- Add CRD version `v1alpha2` for `SparkApplication` and `SparkApplicationTemplate`. The conversion webhook converts `v1alpha1` objects to `v1alpha2` ([#711]).
10
11
11
12
### Fixed
12
13
@@ -15,6 +16,8 @@ All notable changes to this project will be documented in this file.
15
16
16
17
### Changed
17
18
19
+
- BREAKING: The operator no longer runs a separate `spark-submit` process for `SparkApplication`s. The driver is launched directly as a Kubernetes `Job` (built from `spec.driver`) running `spark-submit` in client mode; executors are still created by the driver via Spark's Kubernetes backend. A headless driver `Service` is created so executors can reach the driver. This affects both `v1alpha1` (after conversion) and `v1alpha2` objects ([#711]).
20
+
- The driver `Job` is no longer retried on failure (`backoffLimit` is `0`); the previous `spec.job.retryOnFailureCount` is deprecated and ignored ([#711]).
- BREAKING: Each custom resource accepts now only the known config files in `configOverrides`:
20
23
-`SparkApplication`: `spark-env.sh` and `security.properties`
@@ -27,6 +30,11 @@ All notable changes to this project will be documented in this file.
27
30
- Fix the `SparkApplication` CRD description, which incorrectly described it as a "Spark cluster stacklet" rather than a Spark application ([#705]).
28
31
- BREAKING: make application templates namespaced instead of cluster wide objects ([#694]).
29
32
33
+
### Deprecated
34
+
35
+
-`SparkApplication`/`SparkApplicationTemplate``spec.job` is deprecated and ignored since `v1alpha2` (renamed to `deprecatedJob` in that version). The driver `Job` is now built from `spec.driver` ([#711]).
36
+
-`SparkApplication`/`SparkApplicationTemplate``spec.mode` is deprecated and ignored: the operator always runs the driver in client mode internally ([#711]).
Copy file name to clipboardExpand all lines: docs/modules/spark-k8s/pages/getting_started/first_steps.adoc
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,13 @@ Afterwards you can <<_verify_that_it_works, verify that it works>> by looking at
6
6
7
7
== Starting a Spark job
8
8
9
-
A Spark application is made of up three components:
9
+
A Spark application is made up of two components:
10
10
11
-
* Job: this builds a `spark-submit` command from the resource, passing this to internal spark code together with templates for building the driver and executor pods
12
-
* Driver: the driver starts the designated number of executors and removes them when the job is completed.
13
-
* Executor(s): responsible for executing the job itself
11
+
* Driver: the operator creates a Kubernetes `Job` (built from `spec.driver`) whose pod runs `spark-submit` in client mode and therefore _is_ the Spark driver.
12
+
The driver starts the designated number of executors and removes them when the job is completed.
13
+
* Executor(s): responsible for executing the job itself. They are created by the driver via Spark's Kubernetes backend and connect back to the driver through a headless `Service` created by the operator.
14
+
15
+
NOTE: Previous versions ran an additional `spark-submit` process in a dedicated pod that then created the driver pod. This is no longer the case; `spec.job` and `spec.mode` are deprecated and ignored.
14
16
15
17
Create a Spark application by running:
16
18
@@ -27,22 +29,21 @@ include::example$getting_started/application.yaml[Create a Spark application]
27
29
----
28
30
<1> `metadata.name` contains the name of the SparkApplication
29
31
<2> `spec.sparkImage`: the image used by the job, driver and executor pods. This can be a custom image built by the user or an official Stackable image. Available official images are stored in the Stackable https://oci.stackable.tech/[image registry,window=_blank]. Information on how to browse the registry can be found xref:contributor:project-overview.adoc#docker-images[here,window=_blank].
30
-
<3> `spec.mode`: only `cluster` is currently supported
32
+
<3> `spec.mode`: deprecated and ignored; the driver always runs in client mode internally.
31
33
<4> `spec.mainApplicationFile`: the artifact (Java, Scala or Python) that forms the basis of the Spark job.
32
34
This path is relative to the image, so in this case an example python script (that calculates the value of pi) is running: it is bundled with the Spark code and therefore already present in the job image
33
-
<5> `spec.job`: submit command specific settings.
34
-
<6> `spec.driver`: driver-specific settings.
35
+
<5> `spec.job`: deprecated and ignored. In previous versions this configured the dedicated `spark-submit` job.
36
+
<6> `spec.driver`: driver-specific settings. Used to build the driver `Job` pod.
35
37
<7> `spec.executor`: executor-specific settings.
36
38
37
39
== Verify that it works
38
40
39
-
As mentioned above, the SparkApplication that has just been created builds a `spark-submit` command and pass it to the driver Pod, which in turn creates executor Pods that run for the duration of the job before being clean up.
41
+
As mentioned above, the operator creates a driver `Job` whose pod runs `spark-submit` in client mode and thus acts as the Spark driver, which in turn creates executor Pods that run for the duration of the job before being cleaned up.
* `pyspark-pi-xxxx`: this is the initializing job that creates the spark-submit command (named as `metadata.name` with a unique suffix)
45
-
* `pyspark-pi-xxxxxxx-driver`: the driver pod that drives the execution
46
+
* `pyspark-pi-xxxxxxx-driver`: the driver pod (created by the driver `Job`) that drives the execution
46
47
* `pythonpi-xxxxxxxxx-exec-x`: the set of executors started by the driver (in the example `spec.executor.instances` was set to 3 which is why 3 executors are running)
47
48
48
49
Job progress can be followed by issuing this command:
Copy file name to clipboardExpand all lines: docs/modules/spark-k8s/pages/usage-guide/examples.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The following examples have the following `spec` fields in common:
6
6
* `version`: the current version is "1.0"
7
7
* `sparkImage`: the docker image that is used by job, driver and executor pods.
8
8
This can be provided by the user.
9
-
* `mode`: only `cluster` is currently supported
9
+
* `mode`: deprecated and ignored; the driver always runs in client mode internally
10
10
* `mainApplicationFile`: the artifact (Java, Scala or Python) that forms the basis of the Spark job.
11
11
* `args`: these are the arguments passed directly to the application. In the examples below it is e.g. the input path for part of the public New York taxi dataset.
12
12
* `sparkConf`: these list spark configuration settings that are passed directly to `spark-submit` and which are best defined explicitly by the user. Since the `SparkApplication` "knows" that there is an external dependency (the s3 bucket where the data and/or the application is located) and how that dependency should be treated (i.e. what type of credential checks are required, if any), it is better to have these things declared together.
0 commit comments