Skip to content
Snippets Groups Projects
Commit 8fa00dd0 authored by bomeng's avatar bomeng Committed by Marcelo Vanzin
Browse files

[SPARK-15737][CORE] fix jetty warning

## What changes were proposed in this pull request?

After upgrading Jetty to 9.2, we always see "WARN org.eclipse.jetty.server.handler.AbstractHandler: No Server set for org.eclipse.jetty.server.handler.ErrorHandler" while running any test cases.

This PR will fix it.

## How was this patch tested?

The existing test cases will cover it.

Author: bomeng <bmeng@us.ibm.com>

Closes #13475 from bomeng/SPARK-15737.
parent c2f0cb4f
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,7 @@ private[spark] abstract class RestSubmissionServer( ...@@ -89,6 +89,7 @@ private[spark] abstract class RestSubmissionServer(
server.addConnector(connector) server.addConnector(connector)
val mainHandler = new ServletContextHandler val mainHandler = new ServletContextHandler
mainHandler.setServer(server)
mainHandler.setContextPath("/") mainHandler.setContextPath("/")
contextToServlet.foreach { case (prefix, servlet) => contextToServlet.foreach { case (prefix, servlet) =>
mainHandler.addServlet(new ServletHolder(servlet), prefix) mainHandler.addServlet(new ServletHolder(servlet), prefix)
......
...@@ -291,6 +291,7 @@ private[spark] object JettyUtils extends Logging { ...@@ -291,6 +291,7 @@ private[spark] object JettyUtils extends Logging {
val errorHandler = new ErrorHandler() val errorHandler = new ErrorHandler()
errorHandler.setShowStacks(true) errorHandler.setShowStacks(true)
errorHandler.setServer(server)
server.addBean(errorHandler) server.addBean(errorHandler)
server.setHandler(collection) server.setHandler(collection)
try { try {
......
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