We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20469d4 commit b55dfc6Copy full SHA for b55dfc6
1 file changed
bin/spark-class2.cmd
@@ -63,7 +63,12 @@ if not "x%JAVA_HOME%"=="x" (
63
64
rem The launcher library prints the command to be executed in a single line suitable for being
65
rem executed by the batch interpreter. So read all the output of the launcher into a variable.
66
+:gen
67
set LAUNCHER_OUTPUT=%temp%\spark-class-launcher-output-%RANDOM%.txt
68
+rem SPARK-28302: %RANDOM% would return the same number if we call it instantly after last call,
69
+rem so we should make sure to generate unique file to avoid process collision of writing into a
70
+rem same file concurrently.
71
+if exist %LAUNCHER_OUTPUT% goto :gen
72
"%RUNNER%" -Xmx128m -cp "%LAUNCH_CLASSPATH%" org.apache.spark.launcher.Main %* > %LAUNCHER_OUTPUT%
73
for /f "tokens=*" %%i in (%LAUNCHER_OUTPUT%) do (
74
set SPARK_CMD=%%i
0 commit comments