[ 
https://issues.apache.org/jira/browse/SPARK-1527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973087#comment-13973087
 ] 

Ye Xianjin commented on SPARK-1527:
-----------------------------------

Yes. You are right. toString() may give relative path. And since it's 
determined by java.io.tmpdir system property. see 
https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/io/Files.java
 line 591. It's possible that the DiskBlockManager will create different 
directories than the original temp dir when java.io.tmpdir is a relative path. 

so use getAbsolutePath since I use this method in my last pr?

But, I saw toString() was called other places! Should we do something about 
that?

> rootDirs in DiskBlockManagerSuite doesn't get full path from rootDir0, 
> rootDir1
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-1527
>                 URL: https://issues.apache.org/jira/browse/SPARK-1527
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 0.9.0
>            Reporter: Ye Xianjin
>            Priority: Minor
>              Labels: starter
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> In core/src/test/scala/org/apache/storage/DiskBlockManagerSuite.scala
>   val rootDir0 = Files.createTempDir()
>   rootDir0.deleteOnExit()
>   val rootDir1 = Files.createTempDir()
>   rootDir1.deleteOnExit()
>   val rootDirs = rootDir0.getName + "," + rootDir1.getName
> rootDir0 and rootDir1 are in system's temporary directory. 
> rootDir0.getName will not get the full path of the directory but the last 
> component of the directory. When passing to DiskBlockManage constructor, the 
> DiskBlockerManger creates directories in pwd not the temporary directory.
> rootDir0.toString will fix this issue.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to