Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/16582#discussion_r97117257
--- Diff: core/src/main/scala/org/apache/spark/ui/JettyUtils.scala ---
@@ -306,23 +311,31 @@ private[spark] object JettyUtils extends Logging {
httpConnector.setPort(currentPort)
connectors += httpConnector
- sslOptions.createJettySslContextFactory().foreach { factory =>
- // If the new port wraps around, do not try a privileged port.
- val securePort =
- if (currentPort != 0) {
- (currentPort + 400 - 1024) % (65536 - 1024) + 1024
- } else {
- 0
- }
- val scheme = "https"
- // Create a connector on port securePort to listen for HTTPS
requests
- val connector = new ServerConnector(server, factory)
- connector.setPort(securePort)
-
- connectors += connector
-
- // redirect the HTTP requests to HTTPS port
- collection.addHandler(createRedirectHttpsHandler(securePort,
scheme))
+ val httpsConnector = sslOptions.createJettySslContextFactory() match
{
+ case Some(factory) =>
+ // If the new port wraps around, do not try a privileged port.
+ val securePort =
+ if (currentPort != 0) {
+ (currentPort + 400 - 1024) % (65536 - 1024) + 1024
+ } else {
+ 0
+ }
+ val scheme = "https"
+ // Create a connector on port securePort to listen for HTTPS
requests
+ val connector = new ServerConnector(server, factory)
+ connector.setPort(securePort)
+ connector.setName(SPARK_CONNECTOR_NAME)
+ connectors += connector
+
+ // redirect the HTTP requests to HTTPS port
+ httpConnector.setName(REDIRECT_CONNECTOR_NAME)
+ collection.addHandler(createRedirectHttpsHandler(securePort,
scheme))
--- End diff --
Actually that is caused by my change, so let me fix it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]