-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-18187][SS] CompactibleFileStreamLog should not rely on "compactInterval" to detect a compaction batch #15828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
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
Contributor
|
related to #15827 |
|
Test build #68402 has finished for PR 15828 at commit
|
|
Test build #68412 has finished for PR 15828 at commit
|
|
Test build #68454 has finished for PR 15828 at commit
|
7126665 to
ca5e984
Compare
Contributor
Author
|
rebased.
|
Contributor
Author
|
Jenkins retest this please |
|
Test build #68584 has finished for PR 15828 at commit
|
|
Test build #68585 has finished for PR 15828 at commit
|
asfgit
pushed a commit
that referenced
this pull request
Nov 22, 2016
…mLog` directly ## What changes were proposed in this pull request? Right now we are testing the most of `CompactibleFileStreamLog` in `FileStreamSinkLogSuite` (because `FileStreamSinkLog` once was the only subclass of `CompactibleFileStreamLog`, but now it's not the case any more). Let's refactor the tests so that `CompactibleFileStreamLog` is directly tested, making future changes (like #15828, #15827) to `CompactibleFileStreamLog` much easier to test and much easier to review. ## How was this patch tested? the PR itself is about tests Author: Liwei Lin <lwlin7@gmail.com> Closes #15870 from lw-lin/test-compact-1113.
asfgit
pushed a commit
that referenced
this pull request
Nov 22, 2016
…mLog` directly ## What changes were proposed in this pull request? Right now we are testing the most of `CompactibleFileStreamLog` in `FileStreamSinkLogSuite` (because `FileStreamSinkLog` once was the only subclass of `CompactibleFileStreamLog`, but now it's not the case any more). Let's refactor the tests so that `CompactibleFileStreamLog` is directly tested, making future changes (like #15828, #15827) to `CompactibleFileStreamLog` much easier to test and much easier to review. ## How was this patch tested? the PR itself is about tests Author: Liwei Lin <lwlin7@gmail.com> Closes #15870 from lw-lin/test-compact-1113. (cherry picked from commit ebeb083) Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
robert3005
pushed a commit
to palantir/spark
that referenced
this pull request
Dec 2, 2016
…mLog` directly ## What changes were proposed in this pull request? Right now we are testing the most of `CompactibleFileStreamLog` in `FileStreamSinkLogSuite` (because `FileStreamSinkLog` once was the only subclass of `CompactibleFileStreamLog`, but now it's not the case any more). Let's refactor the tests so that `CompactibleFileStreamLog` is directly tested, making future changes (like apache#15828, apache#15827) to `CompactibleFileStreamLog` much easier to test and much easier to review. ## How was this patch tested? the PR itself is about tests Author: Liwei Lin <lwlin7@gmail.com> Closes apache#15870 from lw-lin/test-compact-1113.
uzadude
pushed a commit
to uzadude/spark
that referenced
this pull request
Jan 27, 2017
…mLog` directly ## What changes were proposed in this pull request? Right now we are testing the most of `CompactibleFileStreamLog` in `FileStreamSinkLogSuite` (because `FileStreamSinkLog` once was the only subclass of `CompactibleFileStreamLog`, but now it's not the case any more). Let's refactor the tests so that `CompactibleFileStreamLog` is directly tested, making future changes (like apache#15828, apache#15827) to `CompactibleFileStreamLog` much easier to test and much easier to review. ## How was this patch tested? the PR itself is about tests Author: Liwei Lin <lwlin7@gmail.com> Closes apache#15870 from lw-lin/test-compact-1113.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
Problem
Right now
CompactibleFileStreamLogusescompactIntervalto check if a batch is a compaction batch. However, since this conf is controlled by the user, they may just change it, andCompactibleFileStreamLogwill just silently return the wrong answer.Changes
With this patch the
compactIntervalconfiguration should only be used when deciding if we should perform a new compaction. The identification of a compaction vs a delta is done by looking for the compact suffix.In more details, upon each start/restart, we first examine what metadata files were there, what files among them are compacted files. We introduce
knownCompactionBatchesto hold the existing compaction batches before this run, andzeroBatchto hold the first batch this run should write to.Thus we can support the following situations:
with:
Note this appoach does not require the
compactInteralfor a new run must be consistent with previous runs.How was this patch tested?
added test cases