dongjoon-hyun commented on a change in pull request #25076: [SPARK-28302] 
[CORE] Make sure to generate unique output file for SparkLauncher on Windows
URL: https://github.com/apache/spark/pull/25076#discussion_r301368685
 
 

 ##########
 File path: bin/spark-class2.cmd
 ##########
 @@ -63,7 +63,12 @@ if not "x%JAVA_HOME%"=="x" (
 
 rem The launcher library prints the command to be executed in a single line 
suitable for being
 rem executed by the batch interpreter. So read all the output of the launcher 
into a variable.
+:gen
 set LAUNCHER_OUTPUT=%temp%\spark-class-launcher-output-%RANDOM%.txt
+rem SPARK-28302: %RANDOM% would return the same number if we call it instantly 
after last call,
+rem so we should make sure to generate unique file to avoid process collision 
of writing into a
 
 Review comment:
   nit.
   - `make sure` -> `make it sure`.
   - `into a same file` -> `into the same file`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to