This is an automated email from the ASF dual-hosted git repository.

dongjoon 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 ec40006aa3b [SPARK-40423][K8S][TESTS] Add explicit YuniKorn queue 
submission test coverage
ec40006aa3b is described below

commit ec40006aa3bda9f6fd03bb9c0bda561c139ed5ce
Author: Dongjoon Hyun <dongj...@apache.org>
AuthorDate: Wed Sep 14 09:28:04 2022 -0700

    [SPARK-40423][K8S][TESTS] Add explicit YuniKorn queue submission test 
coverage
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add explicit Yunikorn queue submission test coverage 
instead of implicit assignment by admission controller.
    
    ### Why are the changes needed?
    
    - To provide a proper test coverage.
    - To prevent the side effect of YuniKorn admission controller which 
overrides all Spark's scheduler settings by default (if we do not edit the rule 
explicitly). This breaks Apache Spark's default scheduler K8s IT test coverage.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manually run the CI and check the YuniKorn queue UI.
    ```
    $ build/sbt -Psparkr -Pkubernetes -Pkubernetes-integration-tests 
-Dspark.kubernetes.test.deployMode=docker-desktop 
"kubernetes-integration-tests/test" -Dtest.exclude.tags=minikube,local,decom 
-Dtest.default.exclude.tags=
    ```
    
    <img width="1197" alt="Screen Shot 2022-09-14 at 2 07 38 AM" 
src="https://user-images.githubusercontent.com/9700541/190112005-5863bdd3-2e43-4ec7-b34b-a286d1a7c95e.png";>
    
    Closes #37877 from dongjoon-hyun/SPARK-40423.
    
    Authored-by: Dongjoon Hyun <dongj...@apache.org>
    Signed-off-by: Dongjoon Hyun <dongj...@apache.org>
    (cherry picked from commit 12e48527846d993a78b159fbba3e900a4feb7b55)
    Signed-off-by: Dongjoon Hyun <dongj...@apache.org>
---
 docs/running-on-kubernetes.md                                        | 5 +++--
 .../org/apache/spark/deploy/k8s/integrationtest/YuniKornSuite.scala  | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/running-on-kubernetes.md b/docs/running-on-kubernetes.md
index b57175f358c..f7f7ec539b8 100644
--- a/docs/running-on-kubernetes.md
+++ b/docs/running-on-kubernetes.md
@@ -1822,8 +1822,7 @@ Install Apache YuniKorn:
 ```bash
 helm repo add yunikorn https://apache.github.io/yunikorn-release
 helm repo update
-kubectl create namespace yunikorn
-helm install yunikorn yunikorn/yunikorn --namespace yunikorn --version 1.1.0
+helm install yunikorn yunikorn/yunikorn --namespace yunikorn --version 1.1.0 
--create-namespace --set embedAdmissionController=false
 ```
 
 The above steps will install YuniKorn v1.1.0 on an existing Kubernetes cluster.
@@ -1834,6 +1833,8 @@ Submit Spark jobs with the following extra options:
 
 ```bash
 --conf spark.kubernetes.scheduler.name=yunikorn
+--conf spark.kubernetes.driver.label.queue=root.default
+--conf spark.kubernetes.executor.label.queue=root.default
 --conf spark.kubernetes.driver.annotation.yunikorn.apache.org/app-id={{APP_ID}}
 --conf 
spark.kubernetes.executor.annotation.yunikorn.apache.org/app-id={{APP_ID}}
 ```
diff --git 
a/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/YuniKornSuite.scala
 
b/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/YuniKornSuite.scala
index 5a3c063efa1..0dfb88b259e 100644
--- 
a/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/YuniKornSuite.scala
+++ 
b/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/YuniKornSuite.scala
@@ -21,8 +21,11 @@ class YuniKornSuite extends KubernetesSuite {
 
   override protected def setUpTest(): Unit = {
     super.setUpTest()
+    val namespace = sparkAppConf.get("spark.kubernetes.namespace")
     sparkAppConf
       .set("spark.kubernetes.scheduler.name", "yunikorn")
+      .set("spark.kubernetes.driver.label.queue", "root." + namespace)
+      .set("spark.kubernetes.executor.label.queue", "root." + namespace)
       .set("spark.kubernetes.driver.annotation.yunikorn.apache.org/app-id", 
"{{APP_ID}}")
       .set("spark.kubernetes.executor.annotation.yunikorn.apache.org/app-id", 
"{{APP_ID}}")
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to