This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new b40df01 [SPARK-32227] Fix regression bug in load-spark-env.cmd with
Spark 3.0.0
b40df01 is described below
commit b40df01105e0edd394eebed553b5a41069180a8f
Author: Warren Zhu <[email protected]>
AuthorDate: Thu Jul 30 21:44:49 2020 +0900
[SPARK-32227] Fix regression bug in load-spark-env.cmd with Spark 3.0.0
Fix regression bug in load-spark-env.cmd with Spark 3.0.0
cmd doesn't support set env twice. So set
`SPARK_ENV_CMD=%SPARK_CONF_DIR%\%SPARK_ENV_CMD%` doesn't take effect, which
caused regression.
No
Manually tested.
1. Create a spark-env.cmd under conf folder. Inside this, `echo
spark-env.cmd`
2. Run old load-spark-env.cmd, nothing printed in the output
2. Run fixed load-spark-env.cmd, `spark-env.cmd` showed in the output.
Closes #29044 from warrenzhu25/32227.
Lead-authored-by: Warren Zhu <[email protected]>
Co-authored-by: Warren Zhu <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
(cherry picked from commit 743772095273b464f845efefb3eb59284b06b9be)
Signed-off-by: HyukjinKwon <[email protected]>
---
bin/load-spark-env.cmd | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/bin/load-spark-env.cmd b/bin/load-spark-env.cmd
index 5f98cc3..7e2cf43 100644
--- a/bin/load-spark-env.cmd
+++ b/bin/load-spark-env.cmd
@@ -29,10 +29,7 @@ if [%SPARK_ENV_LOADED%] == [] (
set SPARK_CONF_DIR=%~dp0..\conf
)
- set SPARK_ENV_CMD=%SPARK_CONF_DIR%\%SPARK_ENV_CMD%
- if exist %SPARK_ENV_CMD% (
- call %SPARK_ENV_CMD%
- )
+ call :LoadSparkEnv
)
rem Setting SPARK_SCALA_VERSION if not already set.
@@ -60,3 +57,8 @@ rem set SPARK_SCALA_VERSION=%SCALA_VERSION_2%
rem )
rem )
exit /b 0
+
+:LoadSparkEnv
+if exist "%SPARK_CONF_DIR%\spark-env.cmd" (
+ call "%SPARK_CONF_DIR%\spark-env.cmd"
+)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]