-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Fix SPARK-1256: Master web UI and Worker web UI returns a 404 error #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,10 +111,13 @@ private[spark] object JettyUtils extends Logging { | |
Option(getClass.getClassLoader.getResource(resourceBase)) match { | ||
case Some(res) => | ||
holder.setInitParameter("resourceBase", res.toString) | ||
holder.setInitParameter("welcomeServlets", "false") | ||
holder.setInitParameter("pathInfoOnly", "false") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was able to get it working without these params There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These parameters allow DefaultServlet without unnecessary operations There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes ,These parameters are already "false" by default,can be removed. |
||
case None => | ||
throw new Exception("Could not find resource path for Web UI: " + resourceBase) | ||
} | ||
contextHandler.addServlet(holder, path) | ||
contextHandler.setContextPath(path) | ||
contextHandler.addServlet(holder, "/") | ||
contextHandler | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You actually don't need to append "/static" to the path. Jetty is smart enough to figure it out. (Same in WorkerWebUI and SparkUI)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so get / static / static / * resource path in jetty 9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example:
url http://host:port/static/spark-logo-77x50px-hd.png =>
resource path org/apache/spark/ui/spark-logo-77x50px-hd.png