-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-26132][BUILD][CORE] Remove support for Scala 2.11 in Spark 3.0.0 #23098
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
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 |
|---|---|---|
|
|
@@ -21,37 +21,42 @@ rem This script loads spark-env.cmd if it exists, and ensures it is only loaded | |
| rem spark-env.cmd is loaded from SPARK_CONF_DIR if set, or within the current directory's | ||
| rem conf\ subdirectory. | ||
|
|
||
| set SPARK_ENV_CMD=spark-env.cmd | ||
| if [%SPARK_ENV_LOADED%] == [] ( | ||
| set SPARK_ENV_LOADED=1 | ||
|
|
||
| if [%SPARK_CONF_DIR%] == [] ( | ||
| set SPARK_CONF_DIR=%~dp0..\conf | ||
| ) | ||
|
|
||
| call :LoadSparkEnv | ||
| set SPARK_ENV_CMD=%SPARK_CONF_DIR%\%SPARK_ENV_CMD% | ||
| if exist %SPARK_ENV_CMD% ( | ||
| call %SPARK_ENV_CMD% | ||
| ) | ||
| ) | ||
|
|
||
| rem Setting SPARK_SCALA_VERSION if not already set. | ||
|
|
||
| set ASSEMBLY_DIR2="%SPARK_HOME%\assembly\target\scala-2.11" | ||
| set ASSEMBLY_DIR1="%SPARK_HOME%\assembly\target\scala-2.12" | ||
|
|
||
| if [%SPARK_SCALA_VERSION%] == [] ( | ||
|
|
||
| if exist %ASSEMBLY_DIR2% if exist %ASSEMBLY_DIR1% ( | ||
| echo "Presence of build for multiple Scala versions detected." | ||
| echo "Either clean one of them or, set SPARK_SCALA_VERSION in spark-env.cmd." | ||
| exit 1 | ||
| ) | ||
| if exist %ASSEMBLY_DIR2% ( | ||
| set SPARK_SCALA_VERSION=2.11 | ||
| ) else ( | ||
| set SPARK_SCALA_VERSION=2.12 | ||
| ) | ||
| ) | ||
| rem TODO: revisit for Scala 2.13 support | ||
| set SPARK_SCALA_VERSION=2.12 | ||
|
||
| rem if [%SPARK_SCALA_VERSION%] == [] ( | ||
|
||
| rem set SCALA_VERSION_1=2.12 | ||
| rem set SCALA_VERSION_2=2.11 | ||
| rem | ||
| rem set ASSEMBLY_DIR1=%SPARK_HOME%\assembly\target\scala-%SCALA_VERSION_1% | ||
| rem set ASSEMBLY_DIR2=%SPARK_HOME%\assembly\target\scala-%SCALA_VERSION_2% | ||
| rem set ENV_VARIABLE_DOC=https://spark.apache.org/docs/latest/configuration.html#environment-variables | ||
| rem if exist %ASSEMBLY_DIR2% if exist %ASSEMBLY_DIR1% ( | ||
| rem echo "Presence of build for multiple Scala versions detected (%ASSEMBLY_DIR1% and %ASSEMBLY_DIR2%)." | ||
| rem echo "Remove one of them or, set SPARK_SCALA_VERSION=%SCALA_VERSION_1% in %SPARK_ENV_CMD%." | ||
| rem echo "Visit %ENV_VARIABLE_DOC% for more details about setting environment variables in spark-env.cmd." | ||
| rem echo "Either clean one of them or, set SPARK_SCALA_VERSION in spark-env.cmd." | ||
| rem exit 1 | ||
| rem ) | ||
| rem if exist %ASSEMBLY_DIR1% ( | ||
| rem set SPARK_SCALA_VERSION=%SCALA_VERSION_1% | ||
| rem ) else ( | ||
| rem set SPARK_SCALA_VERSION=%SCALA_VERSION_2% | ||
| rem ) | ||
| rem ) | ||
| exit /b 0 | ||
|
|
||
| :LoadSparkEnv | ||
| if exist "%SPARK_CONF_DIR%\spark-env.cmd" ( | ||
| call "%SPARK_CONF_DIR%\spark-env.cmd" | ||
| ) | ||
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.
@felixcheung is it OK to refer to _2.12 artifacts here? I don't think this one actually exists, but is it just an example?
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.
I think there's even a separate discussion about even using this as an example, since that package is now in Spark since 2.4.
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.
@felixcheung was the conclusion that we can make this a dummy package? I just want to avoid showing _2.11 usage here.
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.
yes, dummy name is completely fine with me.