Skip to content
Snippets Groups Projects
Commit b9691826 authored by Andrew Or's avatar Andrew Or
Browse files

[SPARK-5729] Potential NPE in standalone REST API

If the user specifies a bad REST URL, the server will throw an NPE instead of propagating the error back. This is because the default `ErrorServlet` has the wrong prefix. This is a one line fix. I am will add more comprehensive tests in a separate patch.

Author: Andrew Or <andrew@databricks.com>

Closes #4518 from andrewor14/rest-npe and squashes the following commits:

16b15bc [Andrew Or] Correct ErrorServlet context prefix
parent 1cb37700
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,7 @@ private[spark] class StandaloneRestServer( ...@@ -77,7 +77,7 @@ private[spark] class StandaloneRestServer(
new SubmitRequestServlet(masterActor, masterUrl, masterConf) -> s"$baseContext/create/*", new SubmitRequestServlet(masterActor, masterUrl, masterConf) -> s"$baseContext/create/*",
new KillRequestServlet(masterActor, masterConf) -> s"$baseContext/kill/*", new KillRequestServlet(masterActor, masterConf) -> s"$baseContext/kill/*",
new StatusRequestServlet(masterActor, masterConf) -> s"$baseContext/status/*", new StatusRequestServlet(masterActor, masterConf) -> s"$baseContext/status/*",
new ErrorServlet -> "/" // default handler new ErrorServlet -> "/*" // default handler
) )
/** Start the server and return the bound port. */ /** Start the server and return the bound port. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment