public class JettyUtils
extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JettyUtils.ServletParams<T> |
static class |
JettyUtils.ServletParams$ |
Constructor and Description |
---|
JettyUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addFilter(org.eclipse.jetty.servlet.ServletContextHandler handler,
String filter,
scala.collection.immutable.Map<String,String> params) |
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
|
static String |
createProxyLocationHeader(String headerValue,
javax.servlet.http.HttpServletRequest clientRequest,
java.net.URI targetUri) |
static java.net.URI |
createProxyURI(String prefix,
String target,
String path,
String query) |
static org.eclipse.jetty.servlet.ServletContextHandler |
createRedirectHandler(String srcPath,
String destPath,
scala.Function1<javax.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
|
static org.eclipse.jetty.servlet.ServletContextHandler |
createServletHandler(String path,
javax.servlet.http.HttpServlet servlet,
String basePath)
Create a context handler that responds to a request with the given path prefix
|
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
|
static org.eclipse.jetty.servlet.ServletContextHandler |
createStaticHandler(String resourceBase,
String path)
Create a handler for serving files from a static directory
|
static JettyUtils.ServletParams<scala.collection.Seq<scala.xml.Node>> |
htmlResponderToServlet(scala.Function1<javax.servlet.http.HttpServletRequest,scala.collection.Seq<scala.xml.Node>> responder) |
static JettyUtils.ServletParams<org.json4s.JsonAST.JValue> |
jsonResponderToServlet(scala.Function1<javax.servlet.http.HttpServletRequest,org.json4s.JsonAST.JValue> responder) |
static void |
org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) |
static org.slf4j.Logger |
org$apache$spark$internal$Logging$$log_() |
static String |
REDIRECT_CONNECTOR_NAME() |
static String |
SPARK_CONNECTOR_NAME() |
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.
|
static JettyUtils.ServletParams<String> |
textResponderToServlet(scala.Function1<javax.servlet.http.HttpServletRequest,String> responder) |
static String[] |
toVirtualHosts(scala.collection.Seq<String> connectors) |
public static String SPARK_CONNECTOR_NAME()
public static String REDIRECT_CONNECTOR_NAME()
public static JettyUtils.ServletParams<org.json4s.JsonAST.JValue> jsonResponderToServlet(scala.Function1<javax.servlet.http.HttpServletRequest,org.json4s.JsonAST.JValue> responder)
public static JettyUtils.ServletParams<scala.collection.Seq<scala.xml.Node>> htmlResponderToServlet(scala.Function1<javax.servlet.http.HttpServletRequest,scala.collection.Seq<scala.xml.Node>> responder)
public static JettyUtils.ServletParams<String> textResponderToServlet(scala.Function1<javax.servlet.http.HttpServletRequest,String> responder)
public static <T> org.eclipse.jetty.servlet.ServletContextHandler createServletHandler(String path, JettyUtils.ServletParams<T> servletParams, SparkConf conf, String basePath)
public static org.eclipse.jetty.servlet.ServletContextHandler createServletHandler(String path, javax.servlet.http.HttpServlet servlet, String basePath)
public static org.eclipse.jetty.servlet.ServletContextHandler createRedirectHandler(String srcPath, String destPath, scala.Function1<javax.servlet.http.HttpServletRequest,scala.runtime.BoxedUnit> beforeRedirect, String basePath, scala.collection.immutable.Set<String> httpMethods)
public static org.eclipse.jetty.servlet.ServletContextHandler createStaticHandler(String resourceBase, String path)
public static org.eclipse.jetty.servlet.ServletContextHandler createProxyHandler(scala.Function1<String,scala.Option<String>> idToUiAddress)
public static org.apache.spark.ui.ServerInfo startJettyServer(String hostName, int port, org.apache.spark.SSLOptions sslOptions, SparkConf conf, String serverName, int poolSize)
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.
hostName
- (undocumented)port
- (undocumented)sslOptions
- (undocumented)conf
- (undocumented)serverName
- (undocumented)poolSize
- (undocumented)public static java.net.URI createProxyURI(String prefix, String target, String path, String query)
public static String createProxyLocationHeader(String headerValue, javax.servlet.http.HttpServletRequest clientRequest, java.net.URI targetUri)
public static void addFilter(org.eclipse.jetty.servlet.ServletContextHandler handler, String filter, scala.collection.immutable.Map<String,String> params)
public static String[] toVirtualHosts(scala.collection.Seq<String> connectors)
public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)