[spark] branch master updated: [SPARK-39006][K8S] Show a directional error message for executor PVC dynamic allocation failure
This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git The following commit(s) were added to refs/heads/master by this push: new b065c945fe2 [SPARK-39006][K8S] Show a directional error message for executor PVC dynamic allocation failure b065c945fe2 is described below commit b065c945fe27dd5869b39bfeaad8e2b23a8835b5 Author: Qian.Sun AuthorDate: Sat May 7 17:58:20 2022 -0700 [SPARK-39006][K8S] Show a directional error message for executor PVC dynamic allocation failure ### What changes were proposed in this pull request? This PR aims to show a directional error message for executor PVC dynamic allocation failure. ### Why are the changes needed? #29846 supports dynamic PVC creation/deletion for K8s executors. #29557 support execId placeholder in executor PVC conf. If not set `spark.kubernetes.executor.volumes.persistentVolumeClaim.spark-local-dir-1.options.claimName` with `onDemand` or `SPARK_EXECUTOR_ID`, spark will continue to try to create the executor pod. After this PR, spark can show a directional error message for this situation. ```plain ERROR ExecutorPodsSnapshotsStoreImpl: Going to stop due to IllegalArgumentException java.lang.IllegalArgumentException: PVC ClaimName should contain OnDemand or SPARK_EXECUTOR_ID when multiple executors are required ``` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Add unit test. Closes #36374 from dcoliversun/SPARK-39006. Authored-by: Qian.Sun Signed-off-by: Dongjoon Hyun --- .../k8s/features/MountVolumesFeatureStep.scala | 16 + .../features/MountVolumesFeatureStepSuite.scala| 39 +- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala index 78dd6ec21ed..d47024ca9fe 100644 --- a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala +++ b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala @@ -23,6 +23,7 @@ import io.fabric8.kubernetes.api.model._ import org.apache.spark.deploy.k8s._ import org.apache.spark.deploy.k8s.Constants.{ENV_EXECUTOR_ID, SPARK_APP_ID_LABEL} +import org.apache.spark.internal.config.EXECUTOR_INSTANCES private[spark] class MountVolumesFeatureStep(conf: KubernetesConf) extends KubernetesFeatureConfigStep { @@ -71,6 +72,7 @@ private[spark] class MountVolumesFeatureStep(conf: KubernetesConf) case KubernetesPVCVolumeConf(claimNameTemplate, storageClass, size) => val claimName = conf match { case c: KubernetesExecutorConf => + checkPVCClaimName(claimNameTemplate) claimNameTemplate .replaceAll(PVC_ON_DEMAND, s"${conf.resourceNamePrefix}-exec-${c.executorId}$PVC_POSTFIX-$i") @@ -120,6 +122,20 @@ private[spark] class MountVolumesFeatureStep(conf: KubernetesConf) override def getAdditionalKubernetesResources(): Seq[HasMetadata] = { additionalResources.toSeq } + + private def checkPVCClaimName(claimName: String): Unit = { +val executorInstances = conf.get(EXECUTOR_INSTANCES) +if (executorInstances.isDefined && executorInstances.get > 1) { + // PVC ClaimName should contain OnDemand or SPARK_EXECUTOR_ID + // when requiring multiple executors. + // Else, spark continues to try to create the executor pod. + if (!claimName.contains(PVC_ON_DEMAND) && !claimName.contains(ENV_EXECUTOR_ID)) { +throw new IllegalArgumentException(s"PVC ClaimName: $claimName " + + s"should contain $PVC_ON_DEMAND or $ENV_EXECUTOR_ID " + + "when requiring multiple executors") + } +} + } } private[spark] object MountVolumesFeatureStep { diff --git a/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStepSuite.scala b/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStepSuite.scala index 468d1dde9fb..e428e54d661 100644 --- a/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStepSuite.scala +++ b/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStepSuite.scala @@ -16,10 +16,13 @@ */ package org.apache.spark.deploy.k8s.features +import java.util.UUID + import scala.collection.JavaConverters._ -import org.apache.spark.SparkFunSuite +import org.apache.spark.{SparkConf,
[spark] branch master updated: [SPARK-39123][BUILD] Upgrade `org.scalatestplus:mockito` to 3.2.12.0
This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git The following commit(s) were added to refs/heads/master by this push: new fdcbc8c6f23 [SPARK-39123][BUILD] Upgrade `org.scalatestplus:mockito` to 3.2.12.0 fdcbc8c6f23 is described below commit fdcbc8c6f23dc22689463f62f37c480f4cacf8b1 Author: yangjie01 AuthorDate: Sat May 7 17:48:46 2022 -0700 [SPARK-39123][BUILD] Upgrade `org.scalatestplus:mockito` to 3.2.12.0 ### What changes were proposed in this pull request? This pr aims to upgrade `org.scalatestplus:mockito-4-2_${scala.binary.version}:3.2.11.0` to `org.scalatestplus:mockito-4-5_${scala.binary.version}:3.2.12.0` and mockito from 4.2.0 to 4.5.1. ### Why are the changes needed? Upgrade `org.scalatestplus:mockito` to use mockito 4.5.1, the upgrade of the `mockito`only brought some bug fixes of itself: - https://github.com/mockito/mockito/releases/tag/v4.3.0 - https://github.com/mockito/mockito/releases/tag/v4.3.1 - https://github.com/mockito/mockito/releases/tag/v4.4.0 - https://github.com/mockito/mockito/releases/tag/v4.5.0 - https://github.com/mockito/mockito/releases/tag/v4.5.1 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GA Closes #36478 from LuciferYang/SPARK-39123. Authored-by: yangjie01 Signed-off-by: Dongjoon Hyun --- pom.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 6081f700b62..319d12a07ee 100644 --- a/pom.xml +++ b/pom.xml @@ -402,7 +402,7 @@ org.scalatestplus - mockito-4-2_${scala.binary.version} + mockito-4-5_${scala.binary.version} test @@ -1143,8 +1143,8 @@ org.scalatestplus -mockito-4-2_${scala.binary.version} -3.2.11.0 +mockito-4-5_${scala.binary.version} +3.2.12.0 test @@ -1156,13 +1156,13 @@ org.mockito mockito-core -4.2.0 +4.5.1 test org.mockito mockito-inline -4.2.0 +4.5.1 test - To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org
[spark] branch master updated (2349f74866a -> a24dfd697c7)
This is an automated email from the ASF dual-hosted git repository. ruifengz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/spark.git from 2349f74866a [SPARK-39121][K8S][DOCS] Fix format error on running-on-kubernetes doc add a24dfd697c7 [SPARK-39114][ML] ml.optim.aggregator avoid re-allocating buffers No new revisions were added by this update. Summary of changes: .../ml/optim/aggregator/AFTBlockAggregator.scala | 16 +-- .../aggregator/BinaryLogisticBlockAggregator.scala | 14 -- .../ml/optim/aggregator/HingeBlockAggregator.scala | 16 +-- .../ml/optim/aggregator/HuberBlockAggregator.scala | 16 +-- .../aggregator/LeastSquaresBlockAggregator.scala | 14 +- .../MultinomialLogisticBlockAggregator.scala | 53 +- 6 files changed, 104 insertions(+), 25 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org
[spark] branch branch-3.3 updated: [SPARK-39121][K8S][DOCS] Fix format error on running-on-kubernetes doc
This is an automated email from the ASF dual-hosted git repository. maxgekk pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/spark.git The following commit(s) were added to refs/heads/branch-3.3 by this push: new 6378365011c [SPARK-39121][K8S][DOCS] Fix format error on running-on-kubernetes doc 6378365011c is described below commit 6378365011c590d7e7225ea05728bfe06490e769 Author: Yikun Jiang AuthorDate: Sat May 7 10:19:53 2022 +0300 [SPARK-39121][K8S][DOCS] Fix format error on running-on-kubernetes doc ### What changes were proposed in this pull request? Fix format error on running-on-kubernetes doc ### Why are the changes needed? Fix format syntax error ### Does this PR introduce _any_ user-facing change? No, unreleased doc only ### How was this patch tested? - `SKIP_API=1 bundle exec jekyll serve --watch` - CI passed Closes #36476 from Yikun/SPARK-39121. Authored-by: Yikun Jiang Signed-off-by: Max Gekk (cherry picked from commit 2349f74866ae1b365b5e4e0ec8a58c4f7f06885c) Signed-off-by: Max Gekk --- docs/running-on-kubernetes.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/running-on-kubernetes.md b/docs/running-on-kubernetes.md index 763a9668d3b..ee77e37beb3 100644 --- a/docs/running-on-kubernetes.md +++ b/docs/running-on-kubernetes.md @@ -1699,7 +1699,7 @@ Kubernetes supports [Pod priority](https://kubernetes.io/docs/concepts/schedulin Spark on Kubernetes allows defining the priority of jobs by [Pod template](#pod-template). The user can specify the priorityClassName in driver or executor Pod template spec section. Below is an example to show how to specify it: -``` +```yaml apiVersion: v1 Kind: Pod metadata: @@ -1729,8 +1729,8 @@ Spark allows users to specify a custom Kubernetes schedulers. 3. Specify scheduler feature step. Users may also consider to use spark.kubernetes.{driver/executor}.pod.featureSteps to support more complex requirements, including but not limited to: - - Create additional Kubernetes custom resources for driver/executor scheduling. - - Set scheduler hints according to configuration or existing Pod info dynamically. + - Create additional Kubernetes custom resources for driver/executor scheduling. + - Set scheduler hints according to configuration or existing Pod info dynamically. Using Volcano as Customized Scheduler for Spark on Kubernetes @@ -1766,7 +1766,7 @@ To use Volcano as a custom scheduler the user needs to specify the following con --conf spark.kubernetes.scheduler.volcano.podGroupTemplateFile=/path/to/podgroup-template.yaml # Specify driver/executor VolcanoFeatureStep --conf spark.kubernetes.driver.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep ---conf spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep``` +--conf spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep ``` # Volcano Feature Step - To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org
[spark] branch master updated: [SPARK-39121][K8S][DOCS] Fix format error on running-on-kubernetes doc
This is an automated email from the ASF dual-hosted git repository. maxgekk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git The following commit(s) were added to refs/heads/master by this push: new 2349f74866a [SPARK-39121][K8S][DOCS] Fix format error on running-on-kubernetes doc 2349f74866a is described below commit 2349f74866ae1b365b5e4e0ec8a58c4f7f06885c Author: Yikun Jiang AuthorDate: Sat May 7 10:19:53 2022 +0300 [SPARK-39121][K8S][DOCS] Fix format error on running-on-kubernetes doc ### What changes were proposed in this pull request? Fix format error on running-on-kubernetes doc ### Why are the changes needed? Fix format syntax error ### Does this PR introduce _any_ user-facing change? No, unreleased doc only ### How was this patch tested? - `SKIP_API=1 bundle exec jekyll serve --watch` - CI passed Closes #36476 from Yikun/SPARK-39121. Authored-by: Yikun Jiang Signed-off-by: Max Gekk --- docs/running-on-kubernetes.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/running-on-kubernetes.md b/docs/running-on-kubernetes.md index f5f2465fb06..c8c202360f8 100644 --- a/docs/running-on-kubernetes.md +++ b/docs/running-on-kubernetes.md @@ -1699,7 +1699,7 @@ Kubernetes supports [Pod priority](https://kubernetes.io/docs/concepts/schedulin Spark on Kubernetes allows defining the priority of jobs by [Pod template](#pod-template). The user can specify the priorityClassName in driver or executor Pod template spec section. Below is an example to show how to specify it: -``` +```yaml apiVersion: v1 Kind: Pod metadata: @@ -1729,8 +1729,8 @@ Spark allows users to specify a custom Kubernetes schedulers. 3. Specify scheduler feature step. Users may also consider to use spark.kubernetes.{driver/executor}.pod.featureSteps to support more complex requirements, including but not limited to: - - Create additional Kubernetes custom resources for driver/executor scheduling. - - Set scheduler hints according to configuration or existing Pod info dynamically. + - Create additional Kubernetes custom resources for driver/executor scheduling. + - Set scheduler hints according to configuration or existing Pod info dynamically. Using Volcano as Customized Scheduler for Spark on Kubernetes @@ -1766,7 +1766,7 @@ To use Volcano as a custom scheduler the user needs to specify the following con --conf spark.kubernetes.scheduler.volcano.podGroupTemplateFile=/path/to/podgroup-template.yaml # Specify driver/executor VolcanoFeatureStep --conf spark.kubernetes.driver.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep ---conf spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep``` +--conf spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep ``` # Volcano Feature Step - To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org