manirajv06 commented on code in PR #553:
URL: https://github.com/apache/yunikorn-k8shim/pull/553#discussion_r1151449763


##########
scripts/run-e2e-tests.sh:
##########
@@ -101,12 +101,20 @@ function install_kind() {
 }
 
 function install_spark() {
-  check_cmd "wget"
-  wget -qO-  
https://archive.apache.org/dist/spark/spark-3.3.1/spark-3.3.1-bin-hadoop3.tgz | 
tar xzvf - && chmod +x spark-3.3.1-bin-hadoop3 && sudo mv 
spark-3.3.1-bin-hadoop3 /opt/.
-  exit_on_error "install spark failed."
-  sudo ln -s /opt/spark-3.3.1-bin-hadoop3 /opt/spark
+  PWD=$(pwd)
+  if [ ! -d "${PWD}/_spark" ]; then
+    echo  "Installing spark in yunikorn rep."
+    check_cmd "wget"
+    mkdir "${PWD}/_spark"
+    wget -qO- 
https://archive.apache.org/dist/spark/spark-3.3.1/spark-3.3.1-bin-hadoop3.tgz | 
tar xzvf - && chmod +x spark-3.3.1-bin-hadoop3 && sudo mv 
spark-3.3.1-bin-hadoop3 "${PWD}/_spark/."
+    exit_on_error "install spark failed."
+  fi
+  if [ -h "${PWD}/_spark/spark" ]; then
+    rm "${PWD}/_spark/spark"
+  fi
+  sudo ln -s "${PWD}/_spark/spark-3.3.1-bin-hadoop3" "${PWD}/_spark/spark"

Review Comment:
   Yes, that way we can close 
https://issues.apache.org/jira/browse/YUNIKORN-1663 and 
https://issues.apache.org/jira/browse/YUNIKORN-1662



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to