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 <notifications@github.com>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>
> .
>