spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ryan-williams <>
Subject [GitHub] spark pull request: [SPARK-3967] don’t redundantly overwrite exe...
Date Fri, 07 Nov 2014 15:56:12 GMT
Github user ryan-williams commented on the pull request:
    OK, I refactored a little further. Updates:
    * renamed the helper function `maybeMoveFile` (instead of `moveFile`)
    * introduced a second signature for `maybeMoveFile` that just takes two `File`s
        * this allowed me to bring the 3rd instance of this repeated logic in `Utils.doFetchFile`
into the fold, which helps the overall consistency / cleanliness a lot, I think.
        * incidentally, that last code path handled the `exists` vs. `delete()` trickery differently
than I was doing before; it used a boolean `var` that recorded explicitly whether we `shouldCopy`
(`true` to start, set to `false` iff we found an identical file to exist). I decided that
this way was cleaner, per @andrewor14's and @pwendell's (earlier in this thread) suggestions,
and structured `maybeMoveFile` that way.
    * folded the code path around L397 into `maybeMoveFile` as well, per @andrewor14's last
    lmk how it looks!

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message