[SPARK-20042] [Web UI] Fix log page buttons for reverse proxy mode#17370
[SPARK-20042] [Web UI] Fix log page buttons for reverse proxy mode#17370okoethibm wants to merge 2 commits intoapache:masterfrom okoethibm:master
Conversation
with spark.ui.reverseProxy=true, full path URLs like /log will point to the master web endpoint which is serving the worker UI as reverse proxy. To access a REST endpoint in the worker in reverse proxy mode , the leading /proxy/<target>/ part of the base URI must be retained. Added logic to log-view.js to handle this, similar to executorspage.js
|
CC @ajbozarth |
ajbozarth
left a comment
There was a problem hiding this comment.
I'm not a big fan of how difficult to read/understand getRESTEndPoint() is, but given it matches similar functionality elsewhere I say this LGTM.
|
@srowen can you ok to test this? |
|
Hm, is this the only link that needs rewriting in the presence of a proxy? it looks kind of brittle, like it depends on a quite specific URL structure. Can this be generalized? And/or can the logic be explained? |
|
This is the only link generated from JavaScript that doesn't work at the moment. As noted above, the same kind of rewrite already takes place in executorspage.js (committed by @tgravescs, function createRESTEndPoint), that's where I copied the logic, with the dependency on /proxy/ inside the URL. |
|
I see, so it's the same approach already used everywhere else and it's not easy to centralize. OK. |
|
@srowen Can you please "ok to test" then? |
|
Test build #3636 has finished for PR 17370 at commit
|
with spark.ui.reverseProxy=true, full path URLs like /log will point to the master web endpoint which is serving the worker UI as reverse proxy. To access a REST endpoint in the worker in reverse proxy mode , the leading /proxy/"target"/ part of the base URI must be retained. Added logic to log-view.js to handle this, similar to executorspage.js Patch was tested manually Author: Oliver Köth <okoeth@de.ibm.com> Closes #17370 from okoethibm/master. (cherry picked from commit 6f09dc7) Signed-off-by: Sean Owen <sowen@cloudera.com>
|
Merged to master/2.1 |
with spark.ui.reverseProxy=true, full path URLs like /log will point to
the master web endpoint which is serving the worker UI as reverse proxy.
To access a REST endpoint in the worker in reverse proxy mode , the
leading /proxy/"target"/ part of the base URI must be retained.
Added logic to log-view.js to handle this, similar to executorspage.js
Patch was tested manually