Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18801#discussion_r156240243
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
    @@ -1216,7 +1216,36 @@ private[spark] object SparkSubmitUtils {
     
       /** A nice function to use in tests as well. Values are dummy strings. */
       def getModuleDescriptor: DefaultModuleDescriptor = 
DefaultModuleDescriptor.newDefaultInstance(
    -    ModuleRevisionId.newInstance("org.apache.spark", 
"spark-submit-parent", "1.0"))
    +    // Include timestamp in module name, so multiple clients resolving 
maven coordinates at the
    +    // same time do not modify the same resolution file concurrently.
    +    ModuleRevisionId.newInstance("org.apache.spark",
    +      "spark-submit-parent-" + System.currentTimeMillis().toString,
    --- End diff --
    
    `System.currentTimeMillis()` is not very unique. If you want uniqueness, 
use a UUID, or better yet, `java.nio.file.Files.createTempFile`.


---

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

Reply via email to