From 5ac5460767712ef6a44f126869cbebe7d63d946d Mon Sep 17 00:00:00 2001 From: HiuFung Kwok Date: Tue, 7 Nov 2023 13:08:09 +0800 Subject: [PATCH 01/19] SPARK-45522: Bump jetty to v10 --- core/pom.xml | 5 ----- core/src/main/scala/org/apache/spark/ui/JettyUtils.scala | 4 +++- pom.xml | 8 +------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index c093213bd6b94..4792122d72f9d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -146,11 +146,6 @@ jetty-http compile - - org.eclipse.jetty - jetty-continuation - compile - org.eclipse.jetty jetty-servlet diff --git a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala index 849ee14c0afb4..aec0b6379b84f 100644 --- a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala +++ b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala @@ -204,7 +204,7 @@ private[spark] object JettyUtils extends Logging { // SPARK-21176: Use the Jetty logic to calculate the number of selector threads (#CPUs/2), // but limit it to 8 max. val numSelectors = math.max(1, math.min(8, Runtime.getRuntime().availableProcessors() / 2)) - new HttpClient(new HttpClientTransportOverHTTP(numSelectors), null) + new HttpClient(new HttpClientTransportOverHTTP(numSelectors)) } override def filterServerResponseHeader( @@ -325,8 +325,10 @@ private[spark] object JettyUtils extends Logging { // If SSL is configured, create the secure connector first. val securePort = sslOptions.createJettySslContextFactory().map { factory => + val securePort = sslOptions.port.getOrElse(if (port > 0) Utils.userPort(port, 400) else 0) val secureServerName = if (serverName.nonEmpty) s"$serverName (HTTPS)" else serverName + val connectionFactories = AbstractConnectionFactory.getFactories(factory, new HttpConnectionFactory(httpConfig)) diff --git a/pom.xml b/pom.xml index e290273543c63..6bbc2c8b42a30 100644 --- a/pom.xml +++ b/pom.xml @@ -143,7 +143,7 @@ 1.13.1 1.9.2 shaded-protobuf - 9.4.53.v20231009 + 10.0.18 4.0.3 0.10.0