From c7af77e0a1765635014b7355229d947c09735e27 Mon Sep 17 00:00:00 2001 From: wforget <643348094@qq.com> Date: Mon, 27 Nov 2023 13:27:25 +0800 Subject: [PATCH] Check spark commands only when ENABLE_SPARK is true and fix the last print --- linkis-dist/bin/checkEnv.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/linkis-dist/bin/checkEnv.sh b/linkis-dist/bin/checkEnv.sh index 68682a2338..d86a76385d 100644 --- a/linkis-dist/bin/checkEnv.sh +++ b/linkis-dist/bin/checkEnv.sh @@ -169,12 +169,6 @@ echo "check hdfs" need_cmd hdfs echo "check shell" need_cmd $SHELL -echo "check spark-submit" -need_cmd spark-submit -echo "check spark-shell" -need_cmd spark-shell -echo "check spark-sql" -need_cmd spark-sql echo "check hadoop" need_cmd hadoop @@ -187,6 +181,12 @@ checkPythonAndJava checkMysql if [ "$ENABLE_SPARK" == "true" ]; then + echo "check spark-submit" + need_cmd spark-submit + echo "check spark-shell" + need_cmd spark-shell + echo "check spark-sql" + need_cmd spark-sql checkSpark fi @@ -227,4 +227,4 @@ if [ "$portIsOccupy" = true ];then exit 1 fi -echo "\n <-----End to check service Port---->" \ No newline at end of file +echo -e "\n<-----End to check service Port---->"