[ZEPPELIN-4710]. Allow to inject application id into custom spark url#3711
Closed
zjffdu wants to merge 2 commits intoapache:masterfrom
Closed
[ZEPPELIN-4710]. Allow to inject application id into custom spark url#3711zjffdu wants to merge 2 commits intoapache:masterfrom
zjffdu wants to merge 2 commits intoapache:masterfrom
Conversation
alexott
requested changes
Apr 1, 2020
Comment on lines
+240
to
+241
| val webUiUrl = properties.getProperty("zeppelin.spark.uiWebUrl"); | ||
| if (!StringUtils.isBlank(webUiUrl)) { | ||
| this.sparkUrl = webUiUrl.replace("{{applicationId}}", sc.applicationId); | ||
| } else { | ||
| useYarnProxyURLIfNeeded() | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
I would move this into a separate function to remove duplicates.
Another issue - we need to make safe value from sc.applicationId, so we couldn't get any security problem...
Contributor
Author
There was a problem hiding this comment.
Thanks for the suggestion @alexott , I have removed the code duplicated. What do you mean security problem ? spark appId is generated by spark resource manager ? I don't see security problem
Contributor
There was a problem hiding this comment.
Ok, that was my concern - if we can say that applicationId is safely generated, and not provided by user, then I'm ok...
alexott
approved these changes
Apr 7, 2020
asfgit
pushed a commit
that referenced
this pull request
Apr 8, 2020
### What is this PR for?
This is for injecting appId into custom spark url. Currently we allow user to set `zeppelin.spark.uiWebUrl` for a custom spark ui link. But we didn't inject appId into it. this make it less flexible for some cases. So this PR is to allow inject application id into custom spark url. e.g.
`url_prefix/{{applicationId}}`
### What type of PR is it?
[Improvement]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4710
### How should this be tested?
* Unit test added
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jeff Zhang <zjffdu@apache.org>
Closes #3711 from zjffdu/ZEPPELIN-4710 and squashes the following commits:
a887199 [Jeff Zhang] remove code duplicate
68fceec [Jeff Zhang] [ZEPPELIN-4710]. Allow to inject application id into custom spark url
(cherry picked from commit ec16666)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>
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.
What is this PR for?
This is for injecting appId into custom spark url. Currently we allow user to set
zeppelin.spark.uiWebUrlfor a custom spark ui link. But we didn't inject appId into it. this make it less flexible for some cases. So this PR is to allow inject application id into custom spark url. e.g.url_prefix/{{applicationId}}What type of PR is it?
[Improvement]
Todos
What is the Jira issue?
How should this be tested?
Screenshots (if appropriate)
Questions: