Add sample method to IndexingServiceClient#10729
Merged
jon-wei merged 3 commits intoapache:masterfrom Jan 5, 2021
Merged
Conversation
Contributor
Author
|
Adding a test now for the new method, will update shortly |
| SamplerResponse that = (SamplerResponse) o; | ||
| return getNumRowsRead() == that.getNumRowsRead() && | ||
| getNumRowsIndexed() == that.getNumRowsIndexed() && | ||
| Objects.equals(getData(), that.getData()); |
Contributor
There was a problem hiding this comment.
this may not do the correct thing always.
Contributor
Author
There was a problem hiding this comment.
What case did you have in mind where this would break down?
Contributor
There was a problem hiding this comment.
Never mind. I was thinking if, for some List implementations, the equals may not have been implemented correctly. But that is unlikely to happen. was also wondering if we care about the order too.
Contributor
Author
There was a problem hiding this comment.
Thanks, IMO responses that have different orders should be considered non-equal
|
This pull request introduces 1 alert when merging 6f0325d into 045b29f - view on LGTM.com new alerts:
|
clintropolis
approved these changes
Jan 5, 2021
JulianJaffePinterest
pushed a commit
to JulianJaffePinterest/druid
that referenced
this pull request
Jan 22, 2021
* Add sample method to IndexingServiceClient * Add unit test * Fix LGTM
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.
This PR adds a
samplemethod toIndexingServiceClientwhich allows the caller to access the sample API on the overlord. To support this the payload and response classes for the API call (SamplerSpecandSamplerResponse) have been moved toserverfrom theindexing-servicemodule.This PR has: