Skip to content

Commit

Permalink
[SPARK-48887][K8S] Enable `spark.kubernetes.executor.checkAllContaine…
Browse files Browse the repository at this point in the history
…rs` by default

### What changes were proposed in this pull request?

This PR aims to enable `spark.kubernetes.executor.checkAllContainers` by default from Apache Spark 4.0.0.

### Why are the changes needed?

Since Apache Spark 3.1.0, `spark.kubernetes.executor.checkAllContainers` is supported and useful because [sidecar pattern](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) is used in many cases. Also, it prevents user mistakes which forget and ignore the sidecars' failures by always reporting sidecar failures via executor status.
- apache#29924

### Does this PR introduce _any_ user-facing change?

- This configuration is no-op when there is no other container.
- This will report user containers' error correctly when there exist other containers which are provided by the users.

### How was this patch tested?

Both `true` and `false` are covered by our CI test coverage since Apache Spark 3.1.0.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#47337 from dongjoon-hyun/SPARK-48887.

Authored-by: Dongjoon Hyun <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
  • Loading branch information
dongjoon-hyun committed Jul 12, 2024
1 parent 115c6e4 commit e5e751b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/core-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ license: |

- Since Spark 4.0, Spark uses `ReadWriteOncePod` instead of `ReadWriteOnce` access mode in persistence volume claims. To restore the legacy behavior, you can set `spark.kubernetes.legacy.useReadWriteOnceAccessMode` to `true`.

- Since Spark 4.0, Spark reports its executor pod status by checking all containers of that pod. To restore the legacy behavior, you can set `spark.kubernetes.executor.checkAllContainers` to `false`.

- Since Spark 4.0, Spark uses `~/.ivy2.5.2` as Ivy user directory by default to isolate the existing systems from Apache Ivy's incompatibility. To restore the legacy behavior, you can set `spark.jars.ivy` to `~/.ivy2`.

- Since Spark 4.0, Spark uses the external shuffle service for deleting shuffle blocks for deallocated executors when the shuffle is no longer needed. To restore the legacy behavior, you can set `spark.shuffle.service.removeShuffle` to `false`.
Expand Down
2 changes: 1 addition & 1 deletion docs/running-on-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ See the [configuration page](configuration.html) for information on Spark config
</tr>
<tr>
<td><code>spark.kubernetes.executor.checkAllContainers</code></td>
<td><code>false</code></td>
<td><code>true</code></td>
<td>
Specify whether executor pods should be check all containers (including sidecars) or only the executor container when determining the pod status.
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ private[spark] object Config extends Logging {
"executor status.")
.version("3.1.0")
.booleanConf
.createWithDefault(false)
.createWithDefault(true)

val KUBERNETES_EXECUTOR_MISSING_POD_DETECT_DELTA =
ConfigBuilder("spark.kubernetes.executor.missingPodDetectDelta")
Expand Down

0 comments on commit e5e751b

Please sign in to comment.