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

    https://github.com/apache/spark/pull/11098#discussion_r52355246
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -516,7 +517,7 @@ private[spark] object Utils extends Logging {
     
         // The file does not exist in the target directory. Copy or move it 
there.
         if (removeSourceFile) {
    -      Files.move(sourceFile, destFile)
    +      Files.move(sourceFile.toPath, destFile.toPath)
    --- End diff --
    
    I did two things in this pr
    1) rename guava.common.io.Files to GFiles anf import Files
    2) call Files (the native jvm interface) when possible
    
    Since files offers the move method it can be used here. In fact the only
    place that gfiles is needed is when comparing file content equality.
    On Feb 9, 2016 10:47 AM, "tedyu" <[email protected]> wrote:
    
    > In core/src/main/scala/org/apache/spark/util/Utils.scala
    > <https://github.com/apache/spark/pull/11098#discussion_r52353770>:
    >
    > > @@ -516,7 +517,7 @@ private[spark] object Utils extends Logging {
    > >
    > >      // The file does not exist in the target directory. Copy or move 
it there.
    > >      if (removeSourceFile) {
    > > -      Files.move(sourceFile, destFile)
    > > +      Files.move(sourceFile.toPath, destFile.toPath)
    >
    > Should GFiles be used here ?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/spark/pull/11098/files#r52353770>.
    >



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