Skip to content

Conversation

@yabola
Copy link
Contributor

@yabola yabola commented Dec 16, 2022

backport #38882

What changes were proposed in this pull request?

Stages UI page fails to load for proxy in some specific yarn environment.

Why are the changes needed?

My environment CDH 5.8 , click to enter the spark UI from the yarn Resource Manager page
when visit the stage URI, it fails to load, URI is
http://:8088/proxy/application_1669877165233_0021/stages/stage/?id=0&attempt=0

The issue is similar to, the final phenomenon of the issue is the same, because the parameter encode twice
SPARK-32467
SPARK-33611

The two issues solve two scenarios to avoid encode twice:

  1. https redirect proxy
  2. set reverse proxy enabled (spark.ui.reverseProxy) in Nginx

But if encode twice due to other reasons, such as this issue (yarn proxy), it will also fail when visit stage page.
It is better to decode parameter twice here.
Just like fix here SPARK-12708 codes

Does this PR introduce any user-facing change?

No

How was this patch tested?

new added UT

@yabola yabola changed the title [SPARK-41365][UI][3.3-backport] Stages UI page fails to load for proxy in specific yarn environment [SPARK-41365][UI][backport] Stages UI page fails to load for proxy in specific yarn environment Dec 16, 2022
@yabola yabola changed the title [SPARK-41365][UI][backport] Stages UI page fails to load for proxy in specific yarn environment [SPARK-41365][UI][Backport] Stages UI page fails to load for proxy in specific yarn environment Dec 16, 2022
@LuciferYang
Copy link
Contributor

LuciferYang commented Dec 16, 2022

[SPARK-41365][UI][3.3] Stages UI page fails ...

@yabola yabola changed the title [SPARK-41365][UI][Backport] Stages UI page fails to load for proxy in specific yarn environment [SPARK-41365][UI][3.3] Stages UI page fails to load for proxy in specific yarn environment Dec 16, 2022
@yabola
Copy link
Contributor Author

yabola commented Dec 16, 2022

retest this please

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @yabola .
Merged to branch-3.3.

dongjoon-hyun pushed a commit that referenced this pull request Dec 16, 2022
…ific yarn environment

backport #38882

### What changes were proposed in this pull request?
Stages UI page fails to load for proxy in some specific yarn environment.

### Why are the changes needed?
My environment CDH 5.8 , click to enter the spark UI from the yarn Resource Manager page
when visit the stage URI, it fails to load,  URI is
http://<yarn-url>:8088/proxy/application_1669877165233_0021/stages/stage/?id=0&attempt=0

The issue is similar to, the final phenomenon of the issue is the same, because the parameter encode twice
[SPARK-32467](https://issues.apache.org/jira/browse/SPARK-32467)
[SPARK-33611](https://issues.apache.org/jira/browse/SPARK-33611)

The two issues solve two scenarios to avoid encode twice:
1. https redirect proxy
2. set reverse proxy enabled (spark.ui.reverseProxy)  in Nginx

But if encode twice due to other reasons, such as this issue (yarn proxy), it will also fail when visit stage page.
It is better to decode parameter twice here.
Just like fix here [SPARK-12708](https://issues.apache.org/jira/browse/SPARK-12708) [codes](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ui/UIUtils.scala#L626)

### Does this PR introduce any user-facing change?
No

### How was this patch tested?
new added UT

Closes #39087 from yabola/fixui-backport.

Authored-by: chenliang.lu <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

I added you to the Apache Spark contributor group and assign SPARK-41365 to you.
Welcome to the Apache Spark community, @yabola .

@yabola
Copy link
Contributor Author

yabola commented Dec 17, 2022

@dongjoon-hyun Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants