Skip to content

Commit f807bd2

Browse files
committed
[SPARK-44857][CORE][UI] Fix getBaseURI error in Spark Worker LogPage UI buttons
### What changes were proposed in this pull request? This PR aims to fix `getBaseURI` errors when we clicks Spark Worker LogPage UI buttons in Apache Spark 3.2.0+. ### Why are the changes needed? Run a Spark job and open the Spark Worker UI, http://localhost:8081 . ``` $ sbin/start-master.sh $ sbin/start-worker.sh spark://127.0.0.1:7077 $ bin/spark-shell --master spark://127.0.0.1:7077 ``` Click `stderr` and `Load New` button. The button is out of order currently due to the following error because `getBaseURI` is defined in `utils.js`. ![Screenshot 2023-08-17 at 2 38 45 PM](https://github.com/apache/spark/assets/9700541/c2358ae3-46d2-43fe-9cc1-ce343725ce4c) ### Does this PR introduce _any_ user-facing change? This will make the buttons work. ### How was this patch tested? Manual. Closes #42546 from dongjoon-hyun/SPARK-44857. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent c321b3d commit f807bd2

File tree

1 file changed

+1
-0
lines changed
  • core/src/main/scala/org/apache/spark/deploy/worker/ui

1 file changed

+1
-0
lines changed

core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ private[ui] class LogPage(parent: WorkerWebUI) extends WebUIPage("logPage") with
102102
s"initLogPage('$logParams', $curLogLength, $startByte, $endByte, $logLength, $byteLength);"
103103

104104
val content =
105+
<script src={UIUtils.prependBaseUri(request, "/static/utils.js")}></script> ++
105106
<div>
106107
{linkToMaster}
107108
{range}

0 commit comments

Comments
 (0)