Github user tnachen commented on a diff in the pull request:
https://github.com/apache/spark/pull/21027#discussion_r208468594
--- Diff:
core/src/main/scala/org/apache/spark/deploy/rest/RestSubmissionServer.scala ---
@@ -331,3 +345,15 @@ private class ErrorServlet extends RestServlet {
sendResponse(error, response)
}
}
+
+private class ServerStatusServlet(server: RestSubmissionServer) extends
RestServlet {
+ override def doGet(req: HttpServletRequest, resp: HttpServletResponse):
Unit = {
+ val path = req.getRequestURI
+ if (!server.isServerHealthy() && path == "/health") {
--- End diff --
I would switch the order (check path first). However, from this logic, if
server is healthy and request is asking for /health, it will return status
instead?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]