spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srowen <...@git.apache.org>
Subject [GitHub] spark pull request: Getting absloute path instead of relative path...
Date Fri, 25 Apr 2014 05:21:03 GMT
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/546#discussion_r11983521
  
    --- Diff: core/src/main/scala/org/apache/spark/broadcast/HttpBroadcast.scala ---
    @@ -213,7 +213,7 @@ private[spark] object HttpBroadcast extends Logging {
         SparkEnv.get.blockManager.master.removeBroadcast(id, removeFromDriver, blocking)
         if (removeFromDriver) {
           val file = getFile(id)
    -      files.remove(file.toString)
    +      files.remove(file.getCanonicalPath)
    --- End diff --
    
    Hmm and also note that the file names are added using the value of `getAbsolutePath()`.
If its absolute path were not-canonicalized it would not work. 
    
    Why not just have `File` objects in the set `files`? They implement the desired `equals()`
semantics:
    http://docs.oracle.com/javase/7/docs/api/java/io/File.html#equals(java.lang.Object)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message