Add support keepSegmentGranularity for automatic compaction#6407
Merged
fjy merged 7 commits intoapache:masterfrom Oct 7, 2018
Merged
Add support keepSegmentGranularity for automatic compaction#6407fjy merged 7 commits intoapache:masterfrom
fjy merged 7 commits intoapache:masterfrom
Conversation
Contributor
Author
|
Ready for review. |
fjy
reviewed
Oct 6, 2018
| |`taskPriority`|[Priority](../ingestion/tasks.html#task-priorities) of compact task.|no (default = 25)| | ||
| |`targetCompactionSizeBytes`|The target segment size of compaction. The actual size of a compact segment might be slightly larger or smaller than this value.|no (default = 838860800)| | ||
| |`numTargetCompactionSegments`|Max number of segments to compact together.|no (default = 150)| | ||
| |`inputSegmentSizeBytes`|Total input segment size of a compactionTask. The actual input size can be slightly larger than this value.|no (default = 419430400)| |
Contributor
There was a problem hiding this comment.
if the total size can be larger, what's the point of this config?
Contributor
There was a problem hiding this comment.
It looks like this is a target size
Contributor
Author
There was a problem hiding this comment.
Hm makes sense. Fixed.
| private static final double ALLOWED_MARGIN_OF_COMPACTION_SIZE = .1; | ||
|
|
||
| static boolean isCompactible(long remainingBytes, long currentTotalBytes, long additionalBytes) | ||
| static boolean isCompactibleSize(long targetBytes, long currentTotalBytes, long additionalBytes) |
Contributor
There was a problem hiding this comment.
this is a confusing name for a function - why rename?
Contributor
There was a problem hiding this comment.
Oh I see, there's 2 functions, by Size and by Name
| return segments; | ||
| } | ||
|
|
||
| int size() |
Contributor
There was a problem hiding this comment.
can we call this getSize() and explicitly list if it is public/private/protected?
| final DataSegment segment = chunks.get(0).getObject(); | ||
| log.warn( | ||
| "shardSize[%d] for dataSource[%s] and interval[%s] is larger than inputSegmentSize[%d]." | ||
| + " Contitnue to the next shard.", |
fjy
approved these changes
Oct 7, 2018
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 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.
Fixes #6135.