-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Refactor SQLMetadataSegmentManager; Change contract of REST methods in DataSourcesResource #7653
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
fb11564
Refactor SQLMetadataSegmentManager; Change contract of REST methods i…
leventov a0f72bd
Style fixes
leventov 2733f8e
Unused imports
leventov 32382b1
Fix tests
leventov 9a52dd0
Merge remote-tracking branch 'upstream/master' into sqlSegmentManager…
leventov 366551b
Fix style
leventov f035751
Comments
leventov 89ba356
Comment fix
leventov 5e18bd6
Merge remote-tracking branch 'upstream/master' into sqlSegmentManager…
leventov f59f5bc
Remove unresolvable Javadoc references; address comments
leventov af941e5
Merge remote-tracking branch 'upstream/master' into sqlSegmentManager…
leventov 8bac8ef
Add comments to ImmutableDruidDataSource
leventov 8915bc0
Merge with master
leventov 727d730
Merge remote-tracking branch 'upstream/master' into sqlSegmentManager…
leventov bd97056
Fix bad web-console merge
leventov 0e39fb4
Fixes in api-reference.md
leventov 82d287d
Rename in DruidCoordinatorRuntimeParams
leventov ec805b4
Fix compilation
leventov cb456cf
Residual changes
leventov 68fa4e4
Merge remote-tracking branch 'upstream/master' into sqlSegmentManager…
leventov 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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 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 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.
VersionedIntervalTimeline
is not thread-safe. Should this be just an integer? I'm not sure how you're planning to useVersionedIntervalTimeline
.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.
Or, this variable is used only in
iterateAllObjects
. Should it return a collection? Or can we change the return type to Stream or Iterator? With this change, we don't have to track the number of objects in the timeline.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.
VersionedIntervalTimeline
actually has to be thread-safe: see #7285.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.
It's more convenient for users of the class if the method returns a
Collection
rather thanIterable
orStream
: it makes possible both for-each iteration and a stream pipeline. Although currently this method is used in just one place withforEach()
call, I don't see much value of over-specializing for this case now.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.
As aforementioned, we don't have to have
numObjects
ifiterateAllObjects()
returns anIterable
orStream
. As you noted, the only user is callingforEach()
on the result, it doesn't have to be a collection. As far as I remember, we agreed on simplifying unnecessarily generalized code.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 actually discovered a use of numObjects in #7306, from where this PR is partially extracted: https://github.com/apache/incubator-druid/pull/7306/files#diff-b3571a010cbbb3cb648676a89936a51fR277