payload: {"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/25076","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/25076/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/25076/comments","events_url":"https://api.github.com/repos/apache/spark/issues/25076/events","html_url":"https://github.com/apache/spark/pull/25076","id":465228241,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk1MzExNjcw","number":25076,"title":"[SPARK-28302] [CORE] Make sure to generate unique output file for SparkLauncher on Windows","user":{"login":"Ngone51","id":16397174,"node_id":"MDQ6VXNlcjE2Mzk3MTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16397174?v=4","gravatar_id":"","url":"https://api.github.com/users/Ngone51","html_url":"https://github.com/Ngone51","followers_url":"https://api.github.com/users/Ngone51/followers","following_url":"https://api.github.com/users/Ngone51/following{/other_user}","gists_url":"https://api.github.com/users/Ngone51/gists{/gist_id}","starred_url":"https://api.github.com/users/Ngone51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ngone51/subscriptions","organizations_url":"https://api.github.com/users/Ngone51/orgs","repos_url":"https://api.github.com/users/Ngone51/repos","events_url":"https://api.github.com/users/Ngone51/events{/privacy}","received_events_url":"https://api.github.com/users/Ngone51/received_events","type":"User","site_admin":false},"labels":[{"id":1405801482,"node_id":"MDU6TGFiZWwxNDA1ODAxNDgy","url":"https://api.github.com/repos/apache/spark/labels/SPARK%20CORE","name":"SPARK CORE","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2019-07-08T12:24:32Z","updated_at":"2019-07-09T02:48:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/25076","html_url":"https://github.com/apache/spark/pull/25076","diff_url":"https://github.com/apache/spark/pull/25076.diff","patch_url":"https://github.com/apache/spark/pull/25076.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nWhen using SparkLauncher to submit applications **concurrently** with multiple threads under **Windows**, some apps would show that \"The process cannot access the file because it is being used by another process\" and remains in LOST state at the end. The issue can be reproduced by  this [demo](https://issues.apache.org/jira/secure/attachment/12973920/Main.scala).\r\n\r\nAfter digging into the code, I find that, Windows cmd `%RANDOM%` would return the same number if we call it  instantly(e.g. < 500ms) after last call. As a result, SparkLauncher would get same output file(spark-class-launcher-output-%RANDOM%.txt) for apps. Then, the following app would hit the issue when it tries to write the same file which has already been opened for writing by another app. \r\n\r\nWe should make sure to generate unique output file for SparkLauncher on Windows to avoid this issue.\r\n\r\n## How was this patch tested?\r\n\r\nTested manually on Windows."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/509465943","html_url":"https://github.com/apache/spark/pull/25076#issuecomment-509465943","issue_url":"https://api.github.com/repos/apache/spark/issues/25076","id":509465943,"node_id":"MDEyOklzc3VlQ29tbWVudDUwOTQ2NTk0Mw==","user":{"login":"AmplabJenkins","id":4031291,"node_id":"MDQ6VXNlcjQwMzEyOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2019-07-09T02:48:48Z","updated_at":"2019-07-09T02:48:48Z","author_association":"NONE","body":"Merged build finished. Test PASSed."}}
other: {"actor":{"display_login":"AmplabJenkins"}}