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

    https://github.com/apache/spark/pull/3186#discussion_r20106701
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -372,18 +373,25 @@ private[spark] object Utils extends Logging {
           val lockFileName = s"${url.hashCode}${timestamp}_lock"
           val localDir = new File(getLocalDir(conf))
           val lockFile = new File(localDir, lockFileName)
    -      val raf = new RandomAccessFile(lockFile, "rw")
    -      // Only one executor entry.
    -      // The FileLock is only used to control synchronization for 
executors download file,
    -      // it's always safe regardless of lock type (mandatory or advisory).
    -      val lock = raf.getChannel().lock()
    -      val cachedFile = new File(localDir, cachedFileName)
    --- End diff --
    
    This is the only statement after the lock acquisition. It doesn't throw 
anything (unless you want to be pedantic and say it can throw an 
`OutOfMemoryError`), so it shouldn't cause problems. But if you want to be 
pedantic, you could achieve the exact same behavior by moving this statement 
one like up (before the lock acquisition). Which is much simpler than your 
patch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to