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

    https://github.com/apache/spark/pull/18971#discussion_r133774599
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala ---
    @@ -151,7 +153,10 @@ class ReplayListenerSuite extends SparkFunSuite with 
BeforeAndAfter with LocalSp
        * assumption that the event logging behavior is correct (tested in a 
separate suite).
        */
       private def testApplicationReplay(codecName: Option[String] = None) {
    -    val logDirPath = Utils.getFilePath(testDir, "test-replay")
    +    val logDir = new File(testDir.getAbsolutePath, "test-replay")
    +    // Here, it creates `Path` from the URI instead of the absolute path 
for the explicit file
    +    // scheme so that the string representation of this `Path` has leading 
file scheme correctly.
    +    val logDirPath = new Path(logDir.toURI)
    --- End diff --
    
    If we create this from the absolute path, it appears that the string ends 
up with `C:/../..` form and
 `Utils.resolveURI` recognises `C` as the scheme, 
causing "No FileSystem for scheme: C"
 exception.
    
    It looks `Path` can handle this but we can't currently replace 
`Utils.resolveURI` to
 `Path` due to of some corner case of behaviour changes.
    
    For example, with `Path`, "hdfs:///root/spark.jar#app.jar" becomes
 
"hdfs:///root/spark.jar%23app.jar" but with `Utils.resolveURI`,
 
"hdfs:///root/spark.jar#app.jar" becomes "hdfs:///root/spark.jar#app.jar".
    
    `Utils.resolveURI` is being called via, 
https://github.com/apache/spark/blob/90195485a6e8b95b1cb4c5606e508a05b6fdba11/core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala#L163
    
https://github.com/apache/spark/blob/6847e93cf427aa971dac1ea261c1443eebf4089e/core/src/main/scala/org/apache/spark/SparkContext.scala#L401



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