diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d1e8b2bdb9e18..c14230d20c712 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,7 +76,7 @@ stages: vmImage: 'ubuntu-20.04' e2e_pool_definition: vmImage: 'ubuntu-20.04' - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.11" + environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12" run_end_to_end: false container: flink-build-container jdk: 8 @@ -93,5 +93,5 @@ stages: - template: tools/azure-pipelines/build-python-wheels.yml parameters: stage_name: cron_python_wheels - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.11" + environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12" container: flink-build-container diff --git a/docs/README.md b/docs/README.md index 593454b5ef770..d07a97e12cf38 100644 --- a/docs/README.md +++ b/docs/README.md @@ -110,7 +110,7 @@ This will be replaced by the maven artifact for flink-streaming-java that users ```xml org.apache.flink - flink-streaming-java_2.11 + flink-streaming-java_2.12 ``` diff --git a/docs/config.toml b/docs/config.toml index ad1052cac1131..8dfb6e3afbff6 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -52,7 +52,7 @@ pygmentsUseClasses = true TrainingExercises = "//github.com/apache/flink-training" # This suffix is appended to the Scala-dependent Maven artifact names - ScalaVersion = "_2.11" + ScalaVersion = "_2.12" ProjectHomepage = "//flink.apache.org" diff --git a/docs/content.zh/docs/deployment/resource-providers/standalone/docker.md b/docs/content.zh/docs/deployment/resource-providers/standalone/docker.md index 04951b5e0eb62..e315eac3c6feb 100644 --- a/docs/content.zh/docs/deployment/resource-providers/standalone/docker.md +++ b/docs/content.zh/docs/deployment/resource-providers/standalone/docker.md @@ -232,7 +232,7 @@ Images for each supported combination of Flink and Scala versions are available, For example, you can use the following aliases: * `flink:latest` → `flink:-scala_` -* `flink:1.11` → `flink:1.11.-scala_2.11` +* `flink:1.11` → `flink:1.11.-scala_2.12` Note It is recommended to always use an explicit version tag of the docker image that specifies both the needed Flink and Scala versions (for example `flink:1.11-scala_2.12`). diff --git a/docs/content.zh/docs/dev/datastream/project-configuration.md b/docs/content.zh/docs/dev/datastream/project-configuration.md index 6138953c3446c..06b26f8be392d 100644 --- a/docs/content.zh/docs/dev/datastream/project-configuration.md +++ b/docs/content.zh/docs/dev/datastream/project-configuration.md @@ -151,7 +151,7 @@ For that reason, Flink for Scala 2.11 cannot be used with an application that us Scala 2.12. All Flink dependencies that (transitively) depend on Scala are suffixed with the -Scala version that they are built for, for example `flink-streaming-scala_2.11`. +Scala version that they are built for, for example `flink-streaming-scala_2.12`. Developers that only use Java can pick any Scala version, Scala developers need to pick the Scala version that matches their application's Scala version. diff --git a/docs/content/docs/deployment/resource-providers/standalone/docker.md b/docs/content/docs/deployment/resource-providers/standalone/docker.md index 07907fddbaae4..504dcecd398ad 100644 --- a/docs/content/docs/deployment/resource-providers/standalone/docker.md +++ b/docs/content/docs/deployment/resource-providers/standalone/docker.md @@ -232,7 +232,7 @@ Images for each supported combination of Flink and Scala versions are available, For example, you can use the following aliases: * `flink:latest` → `flink:-scala_` -* `flink:1.11` → `flink:1.11.-scala_2.11` +* `flink:1.11` → `flink:1.11.-scala_2.12` Note It is recommended to always use an explicit version tag of the docker image that specifies both the needed Flink and Scala versions (for example `flink:1.11-scala_2.12`). diff --git a/docs/content/docs/dev/datastream/project-configuration.md b/docs/content/docs/dev/datastream/project-configuration.md index afbf716248e15..ee6b779add386 100644 --- a/docs/content/docs/dev/datastream/project-configuration.md +++ b/docs/content/docs/dev/datastream/project-configuration.md @@ -150,7 +150,7 @@ For that reason, Flink for Scala 2.11 cannot be used with an application that us Scala 2.12. All Flink dependencies that (transitively) depend on Scala are suffixed with the -Scala version that they are built for, for example `flink-streaming-scala_2.11`. +Scala version that they are built for, for example `flink-streaming-scala_2.12`. Developers that only use Java can pick any Scala version, Scala developers need to pick the Scala version that matches their application's Scala version. diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml index 543899f45b1c3..c4b00870270d0 100644 --- a/flink-dist/pom.xml +++ b/flink-dist/pom.xml @@ -424,15 +424,6 @@ under the License. - - scala-2.11 - - - !scala-2.12 - - - - symlink-build-target diff --git a/flink-dist/src/main/resources/META-INF/NOTICE b/flink-dist/src/main/resources/META-INF/NOTICE index 8d6ec30c0b260..caaae0734aad3 100644 --- a/flink-dist/src/main/resources/META-INF/NOTICE +++ b/flink-dist/src/main/resources/META-INF/NOTICE @@ -9,7 +9,7 @@ This project bundles the following dependencies under the Apache Software Licens - com.ververica:frocksdbjni:6.20.3-ververica-1.0 - com.google.code.findbugs:jsr305:1.3.9 - com.twitter:chill-java:0.7.6 -- com.twitter:chill_2.11:0.7.6 +- com.twitter:chill_2.12:0.7.6 - commons-cli:commons-cli:1.4 - commons-collections:commons-collections:3.2.2 - commons-io:commons-io:2.11.0 @@ -29,11 +29,10 @@ See bundled license files for details. The following dependencies all share the same BSD license which you find under licenses/LICENSE.scala. -- org.scala-lang:scala-compiler:2.11.12 -- org.scala-lang:scala-library:2.11.12 -- org.scala-lang:scala-reflect:2.11.12 -- org.scala-lang.modules:scala-parser-combinators_2.11:1.1.1 -- org.scala-lang.modules:scala-xml_2.11:1.0.5 +- org.scala-lang:scala-compiler:2.12.7 +- org.scala-lang:scala-library:2.12.7 +- org.scala-lang:scala-reflect:2.12.7 +- org.scala-lang.modules:scala-xml_2.12:1.0.6 This project bundles the following dependencies under the MIT/X11 license. See bundled license files for details. diff --git a/flink-end-to-end-tests/pom.xml b/flink-end-to-end-tests/pom.xml index a6c8c458d571c..f9a166a01ebf4 100644 --- a/flink-end-to-end-tests/pom.xml +++ b/flink-end-to-end-tests/pom.xml @@ -88,6 +88,8 @@ under the License. flink-python-test flink-end-to-end-tests-hbase flink-end-to-end-tests-pulsar + flink-glue-schema-registry-avro-test + flink-glue-schema-registry-json-test @@ -171,23 +173,6 @@ under the License. true - - - scala-2.12 - - 2.12.7 - 2.12 - - - - scala-2.12 - - - - flink-glue-schema-registry-avro-test - flink-glue-schema-registry-json-test - - diff --git a/flink-end-to-end-tests/run-nightly-tests.sh b/flink-end-to-end-tests/run-nightly-tests.sh index 1b3a4babad6e9..10250264b539d 100755 --- a/flink-end-to-end-tests/run-nightly-tests.sh +++ b/flink-end-to-end-tests/run-nightly-tests.sh @@ -253,11 +253,7 @@ LOG4J_PROPERTIES=${END_TO_END_DIR}/../tools/ci/log4j.properties MVN_LOGGING_OPTIONS="-Dlog.dir=${DEBUG_FILES_OUTPUT_DIR} -DlogBackupDir=${DEBUG_FILES_OUTPUT_DIR} -Dlog4j.configurationFile=file://$LOG4J_PROPERTIES" MVN_COMMON_OPTIONS="-Dflink.forkCount=2 -Dflink.forkCountTestPackage=2 -Dfast -Pskip-webui-build" -if [[ ${PROFILE} != *"scala-2.12"* ]]; then - e2e_modules=$(find flink-end-to-end-tests -mindepth 2 -maxdepth 5 -name 'pom.xml' -not -path '*glue-schema-registry*' -printf '%h\n' | sort -u | tr '\n' ',') -else - e2e_modules=$(find flink-end-to-end-tests -mindepth 2 -maxdepth 5 -name 'pom.xml' -printf '%h\n' | sort -u | tr '\n' ',') -fi +e2e_modules=$(find flink-end-to-end-tests -mindepth 2 -maxdepth 5 -name 'pom.xml' -printf '%h\n' | sort -u | tr '\n' ',') e2e_modules="${e2e_modules},$(find flink-walkthroughs -mindepth 2 -maxdepth 2 -name 'pom.xml' -printf '%h\n' | sort -u | tr '\n' ',')" PROFILE="$PROFILE -Pe2e-travis1 -Pe2e-travis2 -Pe2e-travis3 -Pe2e-travis4 -Pe2e-travis5 -Pe2e-travis6" diff --git a/flink-end-to-end-tests/test-scripts/test_quickstarts.sh b/flink-end-to-end-tests/test-scripts/test_quickstarts.sh index 646a75e21a9db..0ba07b6f02905 100755 --- a/flink-end-to-end-tests/test-scripts/test_quickstarts.sh +++ b/flink-end-to-end-tests/test-scripts/test_quickstarts.sh @@ -70,12 +70,6 @@ sed -i -e "s/org.apache.flink.quickstart.StreamingJob/org.apache.flink.quickstar case $PROFILE in *"scala-2.12"*) - echo "Changing scala version" - sed -i -e "s/scala.binary.version>2.11<\/scala.binary/scala.binary.version>2.12<\/scala.binary/" pom.xml - # for flink-quickstart-scala, also change scala version - sed -i -e "s/scala.version>2.11.12<\/scala.ver/scala.version>2.12.7<\/scala.ver/" pom.xml - ;; -*"scala-2.11"*) # all good ;; *"scala-"*) diff --git a/flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroSplittableInputFormatTest.java b/flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroSplittableInputFormatTest.java index e46f60abb2e5a..4bd34c172ecaf 100644 --- a/flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroSplittableInputFormatTest.java +++ b/flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroSplittableInputFormatTest.java @@ -353,7 +353,7 @@ public void testAvroRecovery() throws Exception { org.apache.flink - flink-hadoop-compatibility_2.11 + flink-hadoop-compatibility_2.12 1.6-SNAPSHOT diff --git a/flink-formats/pom.xml b/flink-formats/pom.xml index 0151dcb1d7498..cbb32d9527c6d 100644 --- a/flink-formats/pom.xml +++ b/flink-formats/pom.xml @@ -50,6 +50,8 @@ under the License. flink-orc-nohive flink-hadoop-bulk flink-format-common + flink-avro-glue-schema-registry + flink-json-glue-schema-registry - 2.11.12 - 2.11 + 2.12.7 + 2.12 0.7.6 3.4.14 @@ -787,49 +787,6 @@ under the License. - - scala-2.11 - - 2.11.12 - 2.11 - - - - !scala-2.12 - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-versions - - enforce - - - - - - *:*_2.12 - *:*_2.10 - - Scala 2.10/2.12 dependencies are not allowed for Scala 2.11 builds. This can be caused by hard-coded scala versions, where the 'scala.binary.version' property should be used instead. - - - - - - - - - - - scala-2.12 @@ -838,7 +795,7 @@ under the License. - scala-2.12 + !old-and-unsupported-scala-version diff --git a/tools/azure-pipelines/build-apache-repo.yml b/tools/azure-pipelines/build-apache-repo.yml index cd0030e20b69a..350d9fe6675d3 100644 --- a/tools/azure-pipelines/build-apache-repo.yml +++ b/tools/azure-pipelines/build-apache-repo.yml @@ -69,7 +69,7 @@ stages: name: Default e2e_pool_definition: vmImage: 'ubuntu-20.04' - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.11" + environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12" run_end_to_end: false container: flink-build-container jdk: 8 @@ -109,7 +109,7 @@ stages: vmImage: 'ubuntu-20.04' e2e_pool_definition: vmImage: 'ubuntu-20.04' - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.11" + environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12" run_end_to_end: true container: flink-build-container jdk: 8 @@ -135,17 +135,6 @@ stages: run_end_to_end: true container: flink-build-container jdk: 8 - - template: jobs-template.yml - parameters: - stage_name: cron_scala212 - test_pool_definition: - name: Default - e2e_pool_definition: - vmImage: 'ubuntu-20.04' - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12 -Phive-1.2.1" - run_end_to_end: true - container: flink-build-container - jdk: 8 - template: jobs-template.yml parameters: stage_name: cron_jdk11 @@ -153,7 +142,7 @@ stages: name: Default e2e_pool_definition: vmImage: 'ubuntu-20.04' - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.11 -Djdk11" + environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12 -Djdk11" run_end_to_end: true container: flink-build-container jdk: 11 @@ -164,7 +153,7 @@ stages: name: Default e2e_pool_definition: vmImage: 'ubuntu-20.04' - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.11 -Penable-adaptive-scheduler" + environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12 -Penable-adaptive-scheduler" run_end_to_end: true container: flink-build-container jdk: 8 @@ -176,5 +165,5 @@ stages: - template: build-python-wheels.yml parameters: stage_name: cron_python_wheels - environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.11" + environment: PROFILE="-Dhadoop.version=2.8.3 -Dinclude_hadoop_aws -Dscala-2.12" container: flink-build-container diff --git a/tools/ci/compile.sh b/tools/ci/compile.sh index e442bb81be8e3..0f6cb9bb6bd18 100755 --- a/tools/ci/compile.sh +++ b/tools/ci/compile.sh @@ -113,9 +113,7 @@ echo "============ Run license check ============" find $MVN_VALIDATION_DIR -if [[ ${PROFILE} != *"scala-2.12"* ]]; then - ${CI_DIR}/license_check.sh $MVN_CLEAN_COMPILE_OUT $CI_DIR $(pwd) $MVN_VALIDATION_DIR || exit $? -fi +${CI_DIR}/license_check.sh $MVN_CLEAN_COMPILE_OUT $CI_DIR $(pwd) $MVN_VALIDATION_DIR || exit $? exit $EXIT_CODE diff --git a/tools/releasing/create_binary_release.sh b/tools/releasing/create_binary_release.sh index 559a7538eb11f..e0f48062e70a3 100755 --- a/tools/releasing/create_binary_release.sh +++ b/tools/releasing/create_binary_release.sh @@ -66,8 +66,6 @@ make_binary_release() { if [ $SCALA_VERSION = "2.12" ]; then FLAGS="-Dscala-2.12" - elif [ $SCALA_VERSION = "2.11" ]; then - FLAGS="-Dscala-2.11" else echo "Invalid Scala version ${SCALA_VERSION}" fi @@ -169,7 +167,6 @@ make_python_release() { if [ "$SCALA_VERSION" == "none" ]; then make_binary_release "2.12" - make_binary_release "2.11" make_python_release else make_binary_release "$SCALA_VERSION" diff --git a/tools/releasing/deploy_staging_jars.sh b/tools/releasing/deploy_staging_jars.sh index 6a7af33665739..7c1b87e26f3d4 100755 --- a/tools/releasing/deploy_staging_jars.sh +++ b/tools/releasing/deploy_staging_jars.sh @@ -43,8 +43,5 @@ echo "Deploying to repository.apache.org" COMMON_OPTIONS="-Prelease,docs-and-source -DskipTests -DretryFailedDeploymentCount=10 $CUSTOM_OPTIONS" -echo "Deploying Scala 2.11 version" -$MVN clean deploy $COMMON_OPTIONS -Dscala-2.11 - echo "Deploying Scala 2.12 version" $MVN clean deploy $COMMON_OPTIONS -Dscala-2.12