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

    https://github.com/apache/spark/pull/3670#discussion_r23883434
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -513,13 +516,44 @@ private[spark] object Utils extends Logging {
           Files.move(sourceFile, destFile)
    --- End diff --
    
    Hmmm...
    
        scala> val from = new File("/tmp/foo")
        from: java.io.File = /tmp/foo
        
        scala> val to = new File("/home/vanzin/tmp/foo")
        to: java.io.File = /home/vanzin/tmp/foo
        
        scala> Files.move(from, to)
        java.io.FileNotFoundException: /tmp/foo (Is a directory)
                at java.io.FileInputStream.open(Native Method)
                at java.io.FileInputStream.<init>(FileInputStream.java:120)
                at 
com.google.common.io.Files$FileByteSource.openStream(Files.java:124)
                at 
com.google.common.io.Files$FileByteSource.openStream(Files.java:114)
                at com.google.common.io.ByteSource.copyTo(ByteSource.java:202)
                at com.google.common.io.Files.copy(Files.java:436)
                at com.google.common.io.Files.move(Files.java:651)
    
    I think it doesn't work if `from` and `to` are on different file systems 
(such as in my case above).


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