-
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
Closed
bowenliang123
wants to merge
14
commits into
apache:master
from
bowenliang123:3982-reload-server-conf
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
bf5448e
support reload server config from config file 1. add reloadServerConf…
bowenliang123 c0a358b
change to refresh users' config. rename cli command to `refresh confi…
bowenliang123 e5dd5db
typo
bowenliang123 1b046fe
update comments
bowenliang123 c65398b
fix redundant loadFileDefaults in refreshUserDefaultsConf
bowenliang123 ac407bd
rename config refresh option to `userDefaultsConf` and extracted to R…
bowenliang123 e405dc8
fix user defaults key filtering by adding `getAllUserDefaults` to `Ky…
bowenliang123 619acd2
import
bowenliang123 8dbbbcb
fix typo
bowenliang123 0860e3a
fix: loadFileDefaults in refreshUserDefaultsConf
bowenliang123 786cb2a
add logging for statistics
bowenliang123 b47a154
minor
bowenliang123 b9b80f5
update
bowenliang123 a8fb0bf
fix typo
bowenliang123 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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,26 @@ private[v1] class AdminResource extends ApiRequestContext with Logging { | |
| Response.ok(s"Refresh the hadoop conf for ${fe.connectionUrl} successfully.").build() | ||
| } | ||
|
|
||
| @ApiResponse( | ||
| responseCode = "200", | ||
| content = Array(new Content( | ||
| mediaType = MediaType.APPLICATION_JSON)), | ||
| description = "refresh the user defaults configs") | ||
| @POST | ||
| @Path("refresh/user_defaults_conf") | ||
| def refreshUserDefaultsConf(): Response = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shall we lock this method ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| val userName = fe.getSessionUser(Map.empty[String, String]) | ||
| val ipAddress = fe.getIpAddress | ||
| info(s"Receive refresh user defaults conf request from $userName/$ipAddress") | ||
| if (!userName.equals(administrator)) { | ||
| throw new NotAllowedException( | ||
| s"$userName is not allowed to refresh the user defaults conf") | ||
| } | ||
| info(s"Reloading user defaults conf") | ||
| KyuubiServer.refreshUserDefaultsConf() | ||
| Response.ok(s"Refresh the user defaults conf successfully.").build() | ||
| } | ||
|
|
||
| @ApiResponse( | ||
| responseCode = "200", | ||
| content = Array(new Content( | ||
|
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.