spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewo...@apache.org
Subject spark git commit: [SPARK-5729] Potential NPE in standalone REST API
Date Wed, 11 Feb 2015 04:19:21 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.3 79cd59cde -> 1bc75b0a8


[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

(cherry picked from commit b969182659aa7ea94c38329b86d98a31b23efce8)
Signed-off-by: Andrew Or <andrew@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1bc75b0a
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1bc75b0a
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1bc75b0a

Branch: refs/heads/branch-1.3
Commit: 1bc75b0a81e83cb2643f03dcfe388d8d99838231
Parents: 79cd59c
Author: Andrew Or <andrew@databricks.com>
Authored: Tue Feb 10 20:19:14 2015 -0800
Committer: Andrew Or <andrew@databricks.com>
Committed: Tue Feb 10 20:19:19 2015 -0800

----------------------------------------------------------------------
 .../scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1bc75b0a/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala b/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
index 6e4486e..acd3a2b 100644
--- a/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
@@ -77,7 +77,7 @@ private[spark] class StandaloneRestServer(
     new SubmitRequestServlet(masterActor, masterUrl, masterConf) -> s"$baseContext/create/*",
     new KillRequestServlet(masterActor, masterConf) -> s"$baseContext/kill/*",
     new StatusRequestServlet(masterActor, masterConf) -> s"$baseContext/status/*",
-    new ErrorServlet -> "/" // default handler
+    new ErrorServlet -> "/*" // default handler
   )
 
   /** Start the server and return the bound port. */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message