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

    https://github.com/apache/spark/pull/546#discussion_r11983658
  
    --- 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 --
    
    I have tried both of the following :
    
    1.    deleteBroadcastFile(new File(file.toString).getCanonicalPath)
    2.    deleteBroadcastFile(new File((file.toString).getCanonicalPath))
    In both the cases IDE complaints !
    
    Niraj
    
    
    On Thu, Apr 24, 2014 at 10:21 PM, Sean Owen <[email protected]>wrote:
    
    > In 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)
    >
    > 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)
    >
    > —
    > Reply to this email directly or view it on 
GitHub<https://github.com/apache/spark/pull/546/files#r11983521>
    > .
    >


---
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.
---

Reply via email to