[SPARK-27996][WEBUI][2.4] Send HTTP redirect using the correct protocol when Spark History server is deployed behind the reverse proxy#27083
Closed
ishikin wants to merge 1 commit intoapache:branch-2.4from
Closed
Conversation
|
Can one of the admins verify this patch? |
Contributor
|
Changes need to be made first in the master branch; this PR is against branch-2.4. Also this looks at least partially covered by my fix for SPARK-30240; my change doesn't support the header approach, but you could add that to master instead. |
Author
Member
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 changes were proposed in this pull request?
This PR adds method
updateProtocolFromHeader(request: HttpServletRequest, url: String): Stringto JettyUtils.scala and calls this method from when Spark History Server is generating a redirect response.Why are the changes needed?
This change is needed to address bug SPARK-27996 in History Server. Please note that similar change is likely needed in Spark UI. The scope of this PR is only to address the problem in History Server.
Does this PR introduce any user-facing change?
Yes, the Spark History server deployed in Kubernetes now correctly opens the job page.
How was this patch tested?
The patch was tested by building and deploying Spark History Server to Kubernetes cluster and then observing the behavior of the History Server UI. The regression testing was not performed. I will appreciate is someone can can confirm the Spark History Server still works when deployed on regular infrastructure (e.g. not behind the reverse proxy).