This repository was archived by the owner on Nov 11, 2022. It is now read-only.
FileBasedSink removes temp files from successful bundles#484
Merged
lukecwik merged 1 commit intoGoogleCloudPlatform:masterfrom Nov 15, 2016
Merged
FileBasedSink removes temp files from successful bundles#484lukecwik merged 1 commit intoGoogleCloudPlatform:masterfrom
lukecwik merged 1 commit intoGoogleCloudPlatform:masterfrom
Conversation
lukecwik
suggested changes
Nov 14, 2016
| List<File> temporaryFiles = new ArrayList<>(); | ||
| List<String> temporaryFiles = new ArrayList<>(); | ||
| List<File> outputFiles = new ArrayList<>(); | ||
| for (int i = 0; i < numFiles; i++) { |
Contributor
There was a problem hiding this comment.
Please add a unit test that specifically passes in temporary files that would have never been matched.
Contributor
Author
There was a problem hiding this comment.
Woops. There was a bug (FWIW the bug is not present in beam). Thanks for pushing for the test.
| LOG.debug("Removing {} files.", matches.size()); | ||
| Set<String> allMatches = new HashSet<>(matches); | ||
| allMatches.addAll(knownFiles); | ||
| LOG.debug( |
Contributor
There was a problem hiding this comment.
This log statement might be confusing since X != Y + Z because of the set union. Is there a better way to explain this?
Contributor
Author
There was a problem hiding this comment.
Not sure what you mean: the last parameter of the log message, Z, is defined as X - Y.
This is a weaker but backward-compatible version of respective Beam changes: apache/beam#1050 apache/beam#1278
fb4f8e3 to
fdbb51f
Compare
lukecwik
approved these changes
Nov 15, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a weaker but backward-compatible version of #482.
R: @dhalperi @lukecwik