Skip to content
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

Separated T in nodeData from Criteria #42

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

koushikr
Copy link

@koushikr koushikr commented Oct 18, 2021

This is a subset of the MR: #41, which is an extension of MR #31. The intention is to break #41 into smaller components to make it easy to track changes in the future.

Key Changes

  • The T in the ServiceNode has been broken from the Criteria used in the shard selectors, to help for dynamic binding of criteria, so node filters can be dictated by the clients who are using the bundle, basis any of the client-specific parameters.
  • The unclusteredFinder has been renamed to unsharededFinder and a list-based shardSelector to work with the criteria has been introduced.
  • The shardSelector implementation after the introduction of Criteria can be either of ShardSelector<T, C extends Criteria<T>> implements ShardSelector<T, C, R extends Registry<T>> or ShardSelector<T> implements ShardSelector<T, Criteria<T>, R extends Registry<T>>. Chose the former to keep the Criteria implementation fluid and to be able to have clients define their shardSelector within the bound of any Criteria implementation.
  • Added test cases for HTTP providers and finders.
  • Fixed the review comments on WIP : Ranger HTTP client implementations #41

Why separate T and Criteria

To facilitate for clients to dynamically bind inline criteria when implementing shard selectors, to decouple the type of such criteria bound with the generic T type that has been saved as a part of serviceNode.
This will help clients further wing out their own implementations of criteria basis their individual parameters and supply a matcher during node group (shard) selection.

… ListBasedServiceRegistry along with the MapBased one

1) Added a criteria interface in the ShardSelector to keep it seperate from the T in ServiceNode and trickled the changes upstream to whereever ShardSelector is getting built.
2) Added test cases to the new criteria interface
3) Added Http serivceNodeProvider and serviceFinders, along with the HttpServiceFinderHub
4) Added tests for Http interfaces as well.
5) Added license to the missing files
6) Fixed sonar issues
…for when it has to be latter passed down as an arg to a function.

b) .equalsIgnoreCase in selector tests has crept in during the previous sonar lints, corrected the same.
c) Addressed sonar lint issues on license block
…rce formatting c) Reverted the version change to have the APIs begin with a version
santanusinha added a commit that referenced this pull request Jan 5, 2022
Ranger server [Dependent on PR #42, #43]
@santanusinha santanusinha merged commit 77981ea into flipkart-incubator:http Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants