-
Notifications
You must be signed in to change notification settings - Fork 972
[KYUUBI #3982] [FEATURE] introduce refreshing user defaults configs #3983
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
[KYUUBI #3982] [FEATURE] introduce refreshing user defaults configs #3983
Conversation
… in KyuubiServer to read config and put all to config, 2. add "refresh/server_conf" api to AdminRestApi, 3. add config type "serverConf" in kyuubi-admin cli
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #3983 +/- ##
=========================================
Coverage 52.06% 52.07%
Complexity 13 13
=========================================
Files 529 529
Lines 29155 29169 +14
Branches 3891 3893 +2
=========================================
+ Hits 15181 15191 +10
- Misses 12589 12594 +5
+ Partials 1385 1384 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
An alternative option is wrapper |
|
I am open to refreshing server conf manually or automatically. Auto-refreshed cache with intervals provided is also good to me. |
|
I think the first things is: we should make sure what configs can be hot updated. e.g. what happens if user modify the Kyuubi server port or host ? |
|
Or shall we narrow down to allow refresh the following configs,
|
|
how about referring hadoop implementation |
### _Why are the changes needed?_
The changes allow to:
1. set Kyuubi configuration files:
- `kyuubi-env.sh`
- `kyuubi-defaults.conf`
- `log4j2.xml`
2. restart (recreate) Kyuubi server pods if configuration files have changed
- this probably should be revisited after #3983
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #4004 from dnskr/helm_conf_files_support.
Closes #4004
8367825 [dnskr] [K8S][HELM] Add configuration files support to helm chart
Authored-by: dnskr <dnskrv88@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
|
I would like to change this PR for reloading users' default configs (with For |
SGTM, I suppose this way does not introduce side effects. |
cc @pan3793 @ulysses-you @turboFei |
|
I'm not against this feature. But a question: can this be covered by |
|
| .optional() | ||
| .action((v, c) => c.copy(adminConfigOpts = c.adminConfigOpts.copy(configType = v))) | ||
| .text("The valid config type can be one of the following: hadoopConf.")) | ||
| .text("The valid config type can be one of the following: hadoopConf, userDefaults.")) |
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.
userDefaults => userDefaultsConf
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.
OK, let me fix it.
Thus the cli command will become "kyuubi-admin refresh config userDefaultsConf". conf occurs twice.
| description = "refresh the user defaults configs") | ||
| @POST | ||
| @Path("refresh/user_defaults_conf") | ||
| def refreshUserDefaultsConf(): Response = { |
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.
shall we lock this method ?
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.
refreshUserDefaultsConf of KyuubiServer is synchronized on kyuubiServer.conf to prevent concurrent racing.
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
Outdated
Show resolved
Hide resolved
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
Show resolved
Hide resolved
…efreshConfigCommandConfigType
|
Also, consider backporting this feature to 1.6 ? |
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiServer.scala
Outdated
Show resolved
Hide resolved
| } | ||
| info(s"Reloading the Kyuubi server conf") | ||
| KyuubiServer.refreshUserDefaultsConf() | ||
| Response.ok(s"Refresh the server conf successfully.").build() |
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.
nit: Refresh the user defaults conf successfully
ulysses-you
left a comment
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.
lgtm except one minor comment
|
thanks, merging to master |
Why are the changes needed?
to close #3982 .
Introduce feature of refresh user defaults config (as
___${user}___.*which starts with three continuous underscores "___") from config file viakyuubi-admincli andrefresh/user_defaults_confRest API.refreshUserDefaultsConfmethond in KyuubiServer to read user defautls configs from property file and apply config changes to server's KyuubiConfrefresh/user_defaults_confapi to AdminRestApi callingrefreshUserDefaultsConfof KyuubiServeruserDefautlsin kyuubi-admin cli refresh commandThis feature will
spark.*It won't
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request