-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Deprecate NoneShardSpec and drop support for automatic segment merge #6883
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
9f98d17
Deprecate noneShardSpec
jihoonson a1c0d68
clean up noneShardSpec constructor
jihoonson 3ca3b1f
revert unnecessary change
jihoonson 2b5d595
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson c0f8689
Deprecate mergeTask
jihoonson b39fa5a
add more doc
jihoonson e83672d
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson 5b93340
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson 8be33ff
remove convert from indexMerger
jihoonson 0069d97
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson 9e97fbc
Remove mergeTask
jihoonson 153cd18
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson d74be7d
remove HadoopDruidConverterConfig
jihoonson 9a28bc1
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson 54f4b76
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson a416605
fix build
jihoonson 96b9566
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson 2b7bc79
fix build
jihoonson fcb6248
fix teamcity
jihoonson 575afed
fix teamcity
jihoonson 307c549
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson 6dd9896
fix ServerModule
jihoonson 2ec32d7
fix compilation
jihoonson 7a69f57
fix compilation
jihoonson c6a06f5
Merge branch 'master' of github.com:druid-io/druid into deprecate-non…
jihoonson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ | |
| import org.apache.druid.jackson.CommaListJoinSerializer; | ||
| import org.apache.druid.java.util.common.granularity.Granularities; | ||
| import org.apache.druid.query.SegmentDescriptor; | ||
| import org.apache.druid.timeline.partition.NoneShardSpec; | ||
| import org.apache.druid.timeline.partition.NumberedShardSpec; | ||
| import org.apache.druid.timeline.partition.ShardSpec; | ||
| import org.joda.time.DateTime; | ||
| import org.joda.time.Interval; | ||
|
|
@@ -146,7 +146,7 @@ public DataSegment( | |
| // dataSource | ||
| this.dimensions = prepareDimensionsOrMetrics(dimensions, DIMENSIONS_INTERNER); | ||
| this.metrics = prepareDimensionsOrMetrics(metrics, METRICS_INTERNER); | ||
| this.shardSpec = (shardSpec == null) ? NoneShardSpec.instance() : shardSpec; | ||
| this.shardSpec = (shardSpec == null) ? new NumberedShardSpec(0, 1) : shardSpec; | ||
| this.binaryVersion = binaryVersion; | ||
| this.size = size; | ||
| } | ||
|
|
@@ -373,7 +373,7 @@ public Builder() | |
| this.loadSpec = ImmutableMap.of(); | ||
| this.dimensions = ImmutableList.of(); | ||
| this.metrics = ImmutableList.of(); | ||
| this.shardSpec = NoneShardSpec.instance(); | ||
| this.shardSpec = new NumberedShardSpec(0, 1); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. continuing other comment chain, alternatively maybe this line isn't necessary if everything should be setting it |
||
| this.size = -1; | ||
| } | ||
|
|
||
|
|
||
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to have a static shared instance for
NumberedShardSpec(0, 1)the same way we did forNoneShardSpec?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we can. But I think it would be not common to create a dataSegment with null shardSpec. I guess this code is just for backward compatibility to support a really old version of dataSegment. In recent versions, every dataSegment must have a proper shardSpec.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I was more thinking of the impact through
DataSegment.Builderwhich with this change will now create a new object in the constructor to set the default before it is likely later replaced when the actual shard spec is set before completing the build, instead of the previous behavior of re-using the same object.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh,
DataSegment.Builderis mostly for benchmark or unit tests. It's not supposed to be used in production codes.I don't think the builder pattern is appropriate for DataSegment because it requires for every fields to be filled except
loadSpecin its constructor. But, it's quite prevalent in unit tests, so I left it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, just saw a bunch of usages, didn't look too closely at what they were 👍