-
Notifications
You must be signed in to change notification settings - Fork 226
[TOREE-557] Bump Spark 3.5 #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,24 +23,30 @@ FROM jupyter/all-spark-notebook | |
| USER root | ||
|
|
||
| # Spark dependencies | ||
| ARG APACHE_SPARK_VERSION=3.4.4 | ||
| ARG APACHE_SPARK_VERSION=3.5.7 | ||
| ARG SCALA_VERSION=2.12 | ||
|
|
||
| RUN apt-get -y update && \ | ||
| apt-get install -y --no-install-recommends openjdk-8-jdk ca-certificates-java && \ | ||
| apt-get clean && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| update-ca-certificates -f && \ | ||
| JAVA_8=`update-alternatives --list java | grep java-8-openjdk` && \ | ||
| update-alternatives --set java $JAVA_8 | ||
| RUN JAVA_8=`update-alternatives --list java | grep java-1.8.0-openjdk` || echo $JAVA_8 && \ | ||
| if [ "x$JAVA_8" = "x" ]; then \ | ||
| apt-get -y update ; \ | ||
| apt-get install -y --no-install-recommends openjdk-8-jdk ca-certificates-java ; \ | ||
| apt-get clean ; \ | ||
| rm -rf /var/lib/apt/lists/* ; \ | ||
| update-ca-certificates -f ; \ | ||
| JAVA_8=`update-java-alternatives --list | grep java-1.8.0-openjdk | awk '{print $NF}'` ; \ | ||
| update-java-alternatives --set $JAVA_8 ; \ | ||
| fi | ||
|
|
||
| # Installing Spark3 | ||
| RUN cd /tmp && \ | ||
| if [ "$SCALA_VERSION" = "2.13" ]; then APACHE_SPARK_CUSTOM_NAME=hadoop3-scala2.13; else APACHE_SPARK_CUSTOM_NAME=hadoop3; fi && \ | ||
| wget -q https://archive.apache.org/dist/spark/spark-${APACHE_SPARK_VERSION}/spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME}.tgz && \ | ||
| tar xzf spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME}.tgz -C /usr/local && \ | ||
| rm spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME}.tgz && \ | ||
| ln -snf /usr/local/spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME} /usr/local/spark | ||
| RUN if [ "$SCALA_VERSION" = "2.13" ]; then APACHE_SPARK_CUSTOM_NAME=hadoop3-scala2.13; else APACHE_SPARK_CUSTOM_NAME=hadoop3; fi && \ | ||
| SPARK_TGZ_NAME=spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME} && \ | ||
| if [ ! -d "/usr/local/$SPARK_TGZ_NAME" ]; then \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. install the specific version of spark only when the base image does not have that. |
||
| cd /tmp ; \ | ||
| wget -q https://www.apache.org/dyn/closer.lua/spark/spark-${APACHE_SPARK_VERSION}/${SPARK_TGZ_NAME}.tgz?action=download -O ${SPARK_TGZ_NAME}.tgz ; \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
https://infra.apache.org/release-download-pages.html#download-scripts |
||
| tar -xzf ${SPARK_TGZ_NAME}.tgz -C /usr/local ; \ | ||
| rm ${SPARK_TGZ_NAME}.tgz ; \ | ||
| ln -snf /usr/local/$SPARK_TGZ_NAME /usr/local/spark ; \ | ||
| fi | ||
|
|
||
| # Remove other scala kernels | ||
| RUN cd /opt/conda/share/jupyter/kernels/ && \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,8 @@ | |
| package org.apache.toree.plugins | ||
|
|
||
| import java.io.File | ||
| import org.clapper.classutil.{ClassInfo, ClassFinder} | ||
| import org.clapper.classutil.{ClassFinder, ClassInfo} | ||
| import org.objectweb.asm.Opcodes | ||
| import org.slf4j.LoggerFactory | ||
|
|
||
| import scala.annotation.tailrec | ||
|
|
@@ -52,7 +53,7 @@ class PluginSearcher { | |
| * | ||
| * @return The new class finder | ||
| */ | ||
| protected def newClassFinder(): ClassFinder = ClassFinder(classpath) | ||
| protected def newClassFinder(): ClassFinder = ClassFinder(classpath, Some(Opcodes.ASM9)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. some modern version libs, like Jackson, use multi release jars, which main classes are built against Java 8, but ship optional classes compiled with higher JDK version, we must use newer ASM lib to make it work. see also bmc/classutil#45 |
||
|
|
||
| /** | ||
| * Creates a new class finder for the given paths. | ||
|
|
@@ -61,7 +62,7 @@ class PluginSearcher { | |
| * | ||
| * @return The new class finder | ||
| */ | ||
| protected def newClassFinder(paths: Seq[File]): ClassFinder = ClassFinder(paths) | ||
| protected def newClassFinder(paths: Seq[File]): ClassFinder = ClassFinder(paths, Some(Opcodes.ASM9)) | ||
|
|
||
| /** | ||
| * Loads all class information using the provided class finder. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,20 +26,24 @@ object Dependencies { | |
| val pekkoSlf4j = "org.apache.pekko" %% "pekko-slf4j" % pekkoVersion // Apache v2 | ||
| val pekkoTestkit = "org.apache.pekko" %% "pekko-testkit" % pekkoVersion // Apache v2 | ||
|
|
||
| val clapper = "org.clapper" %% "classutil" % "1.5.1" // BSD 3-clause license, used for detecting plugins | ||
| val asmVersion = "9.9" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upgrade ASM libs used by |
||
| val asm = "org.ow2.asm" % "asm" % asmVersion // Apache v2 | ||
| val asmCommons = "org.ow2.asm" % "asm-commons" % asmVersion // Apache v2 | ||
| val asmUtil = "org.ow2.asm" % "asm-util" % asmVersion // Apache v2 | ||
| val clapper = "org.clapper" %% "classutil" % "1.5.1" // Apache v2, used for detecting plugins | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/bmc/classutil
|
||
|
|
||
| val commonsExec = "org.apache.commons" % "commons-exec" % "1.3" // Apache v2 | ||
|
|
||
| val config = "com.typesafe" % "config" % "1.4.3" // Apache v2 | ||
|
|
||
| val coursierVersion = "2.0.0" | ||
| val coursierVersion = "2.0.16" | ||
| val coursier = "io.get-coursier" %% "coursier" % coursierVersion // Apache v2 | ||
| val coursierCache = "io.get-coursier" %% "coursier-cache" % coursierVersion // Apache v2 | ||
|
|
||
| val ivy = "org.apache.ivy" % "ivy" % "2.5.1" // Apache v2 | ||
|
|
||
| // use the same jackson version in test than the one provided at runtime by Spark 3.4.x | ||
| val jacksonDatabind = "com.fasterxml.jackson.core" % "jackson-databind" % "2.14.2" // Apache v2 | ||
| // use the same jackson version in test than the one provided at runtime by Spark 3.5.x | ||
| val jacksonDatabind = "com.fasterxml.jackson.core" % "jackson-databind" % "2.15.2" // Apache v2 | ||
|
|
||
| val jeroMq = "org.zeromq" % "jeromq" % "0.5.3" // MPL v2 | ||
|
|
||
|
|
@@ -57,7 +61,7 @@ object Dependencies { | |
| val scalaTestMockito = "org.scalatestplus" %% "mockito-4-11" % "3.2.16.0" // Apache v2 | ||
| val mockitoInline = "org.mockito" % "mockito-inline" % "4.11.0" // MIT | ||
|
|
||
| val slf4jApi = "org.slf4j" % "slf4j-api" % "2.0.6" // MIT | ||
| val slf4jApi = "org.slf4j" % "slf4j-api" % "2.0.7" // MIT | ||
|
|
||
| val sparkVersion = settingKey[String]("Version of Apache Spark to use in Toree") // defined in root build | ||
| val sparkCore = Def.setting{ "org.apache.spark" %% "spark-core" % sparkVersion.value } // Apache v2 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use
update-java-alternatives, so that other JVM commands likejavac,jstackalso get updated