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

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 87bdeee  [SPARK-53989] Optimize `sparkapps.sh` to use `kubectl delete 
--all`
87bdeee is described below

commit 87bdeee6ffdb3a47b1053dc31f7d71a4b36bab53
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed Oct 22 13:00:36 2025 -0700

    [SPARK-53989] Optimize `sparkapps.sh` to use `kubectl delete --all`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to optimize `sparkapps.sh` to use `kubectl delete --all` 
instead of BASH pipelining.
    
    ### Why are the changes needed?
    
    To use the K8s native features efficiently.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manual review.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #400 from dongjoon-hyun/SPARK-53989.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 tests/benchmark/sparkapps.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/benchmark/sparkapps.sh b/tests/benchmark/sparkapps.sh
index ea45b68..fbc84d8 100755
--- a/tests/benchmark/sparkapps.sh
+++ b/tests/benchmark/sparkapps.sh
@@ -19,7 +19,7 @@
 
 # 1. Clear the existing CRDs before staring the benchmark
 echo "CLEAN UP NAMESPACE FOR BENCHMARK"
-kubectl get sparkapplications.spark.apache.org -o name | xargs kubectl delete
+kubectl delete sparkapplications.spark.apache.org --all
 
 NUM="${1:-1000}"
 echo "START BENCHMARK WITH $NUM JOBS"
@@ -62,7 +62,7 @@ echo "FINISHED $NUM JOBS IN $completionTime SECONDS."
 
 # 3. Deletion Benchmark
 start=`date +%s`
-kubectl get sparkapplications.spark.apache.org -o name | xargs kubectl delete 
> /dev/null
+kubectl delete sparkapplications.spark.apache.org --all > /dev/null
 end=`date +%s`
 deletionTime=$((end - start))
 echo "DELETED $NUM JOBS IN $deletionTime SECONDS."


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to