Skip to content

Commit ceaa769

Browse files
committed
[SPARK-53989] Optimize sparkapps.sh to use kubectl delete --all
1 parent 06a9518 commit ceaa769

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/benchmark/sparkapps.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# 1. Clear the existing CRDs before staring the benchmark
2121
echo "CLEAN UP NAMESPACE FOR BENCHMARK"
22-
kubectl get sparkapplications.spark.apache.org -o name | xargs kubectl delete
22+
kubectl delete sparkapplications.spark.apache.org --all
2323

2424
NUM="${1:-1000}"
2525
echo "START BENCHMARK WITH $NUM JOBS"
@@ -62,7 +62,7 @@ echo "FINISHED $NUM JOBS IN $completionTime SECONDS."
6262

6363
# 3. Deletion Benchmark
6464
start=`date +%s`
65-
kubectl get sparkapplications.spark.apache.org -o name | xargs kubectl delete > /dev/null
65+
kubectl delete sparkapplications.spark.apache.org --all > /dev/null
6666
end=`date +%s`
6767
deletionTime=$((end - start))
6868
echo "DELETED $NUM JOBS IN $deletionTime SECONDS."

0 commit comments

Comments
 (0)