wForget opened a new pull request #802:
URL: https://github.com/apache/incubator-kyuubi/pull/802
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in
https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your
PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g.,
'[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
Enhance service discovery #786
Refer to the curator-x-discovery module of the curator project for
ServiceDiscovery enhancement.
Some Interfaces:
+ `InstanceProvider`: provide instance that meet some conditions
+ `ProviderStrategy`: select an instance from the instances provided by the
InstanceProvider
+ `ProviderFilter`: used in InstanceProvider to filter some instances
+ `InstanceSerializer`: serialize and deserialize instance object
+ `ServiceDiscoveryClient`: service discovery client, used to obtain the
final instance
Feature:
+ support version filter
+ support tag filter
+ support random strategy
+ support strategy based on session number
TODO:
+ statistics session number
+ persistence engine version, tags and other information
+ adapt to EngineRef
Test Case:
kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/v2/EngineServiceDiscoveryClientSuite.scala
### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run
test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests)
locally before make a pull request
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]