Package org.apache.spark.ui
Class JettyUtils
Object
org.apache.spark.ui.JettyUtils
Utilities for launching a web server using Jetty's HTTP Server class
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic class
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidaddFilter(org.eclipse.jetty.servlet.ServletContextHandler handler, String filter, scala.collection.immutable.Map<String, String> params) static org.eclipse.jetty.servlet.ServletContextHandlercreateProxyHandler(scala.Function1<String, scala.Option<String>> idToUiAddress) Create a handler for proxying request to Workers and Application Driversstatic StringcreateProxyLocationHeader(String headerValue, jakarta.servlet.http.HttpServletRequest clientRequest, URI targetUri) static URIcreateProxyURI(String prefix, String target, String path, String query) static org.eclipse.jetty.servlet.ServletContextHandlercreateRedirectHandler(String srcPath, String destPath, scala.Function1<jakarta.servlet.http.HttpServletRequest, scala.runtime.BoxedUnit> beforeRedirect, String basePath, scala.collection.immutable.Set<String> httpMethods) Create a handler that always redirects the user to the given pathstatic org.eclipse.jetty.servlet.ServletContextHandlercreateServletHandler(String path, jakarta.servlet.http.HttpServlet servlet, String basePath) Create a context handler that responds to a request with the given path prefixstatic <T> org.eclipse.jetty.servlet.ServletContextHandlercreateServletHandler(String path, JettyUtils.ServletParams<T> servletParams, SparkConf conf, String basePath) Create a context handler that responds to a request with the given path prefixstatic org.eclipse.jetty.servlet.ServletContextHandlercreateStaticHandler(String resourceBase, String path) Create a handler for serving files from a static directorystatic JettyUtils.ServletParams<scala.collection.immutable.Seq<scala.xml.Node>>htmlResponderToServlet(scala.Function1<jakarta.servlet.http.HttpServletRequest, scala.collection.immutable.Seq<scala.xml.Node>> responder) static JettyUtils.ServletParams<org.json4s.JValue>jsonResponderToServlet(scala.Function1<jakarta.servlet.http.HttpServletRequest, org.json4s.JValue> responder) static org.apache.spark.internal.Logging.LogStringContextLogStringContext(scala.StringContext sc) static org.slf4j.Loggerstatic voidorg$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) static Stringstatic Stringstatic org.apache.spark.ui.ServerInfostartJettyServer(String hostName, int port, org.apache.spark.SSLOptions sslOptions, SparkConf conf, String serverName, int poolSize) Attempt to start a Jetty server bound to the supplied hostName:port using the given context handlers.static JettyUtils.ServletParams<String>textResponderToServlet(scala.Function1<jakarta.servlet.http.HttpServletRequest, String> responder) static String[]toVirtualHosts(scala.collection.immutable.Seq<String> connectors) 
- 
Constructor Details- 
JettyUtilspublic JettyUtils()
 
- 
- 
Method Details- 
SPARK_CONNECTOR_NAME
- 
REDIRECT_CONNECTOR_NAME
- 
jsonResponderToServletpublic static JettyUtils.ServletParams<org.json4s.JValue> jsonResponderToServlet(scala.Function1<jakarta.servlet.http.HttpServletRequest, org.json4s.JValue> responder) 
- 
htmlResponderToServletpublic static JettyUtils.ServletParams<scala.collection.immutable.Seq<scala.xml.Node>> htmlResponderToServlet(scala.Function1<jakarta.servlet.http.HttpServletRequest, scala.collection.immutable.Seq<scala.xml.Node>> responder) 
- 
textResponderToServletpublic static JettyUtils.ServletParams<String> textResponderToServlet(scala.Function1<jakarta.servlet.http.HttpServletRequest, String> responder) 
- 
createServletHandlerpublic static <T> org.eclipse.jetty.servlet.ServletContextHandler createServletHandler(String path, JettyUtils.ServletParams<T> servletParams, SparkConf conf, String basePath) Create a context handler that responds to a request with the given path prefix
- 
createServletHandlerpublic static org.eclipse.jetty.servlet.ServletContextHandler createServletHandler(String path, jakarta.servlet.http.HttpServlet servlet, String basePath) Create a context handler that responds to a request with the given path prefix
- 
createRedirectHandlerpublic static org.eclipse.jetty.servlet.ServletContextHandler createRedirectHandler(String srcPath, String destPath, scala.Function1<jakarta.servlet.http.HttpServletRequest, scala.runtime.BoxedUnit> beforeRedirect, String basePath, scala.collection.immutable.Set<String> httpMethods) Create a handler that always redirects the user to the given path
- 
createStaticHandlerpublic static org.eclipse.jetty.servlet.ServletContextHandler createStaticHandler(String resourceBase, String path) Create a handler for serving files from a static directory
- 
createProxyHandlerpublic static org.eclipse.jetty.servlet.ServletContextHandler createProxyHandler(scala.Function1<String, scala.Option<String>> idToUiAddress) Create a handler for proxying request to Workers and Application Drivers
- 
startJettyServerpublic static org.apache.spark.ui.ServerInfo startJettyServer(String hostName, int port, org.apache.spark.SSLOptions sslOptions, SparkConf conf, String serverName, int poolSize) Attempt to start a Jetty server bound to the supplied hostName:port using the given context handlers.If the desired port number is contended, continues incrementing ports until a free port is found. Return the jetty Server object, the chosen port, and a mutable collection of handlers. - Parameters:
- hostName- (undocumented)
- port- (undocumented)
- sslOptions- (undocumented)
- conf- (undocumented)
- serverName- (undocumented)
- poolSize- (undocumented)
- Returns:
- (undocumented)
 
- 
createProxyURI
- 
createProxyLocationHeader
- 
addFilter
- 
toVirtualHosts
- 
org$apache$spark$internal$Logging$$log_public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
- 
org$apache$spark$internal$Logging$$log__$eqpublic static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) 
- 
LogStringContextpublic static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc) 
 
-