diff --git a/.travis.yml b/.travis.yml index 72dcfac5036e56be10c0bb0809308db70762e235..44028a7fa49573b30d1b0fbf33715d8d045c5ead 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,27 +64,27 @@ matrix: - jdk: "openjdk8" env: - TEST="core" - - PROFILE="-Dhadoop.version=2.4.1 -Dscala-2.10" + - PROFILE="-Dhadoop.version=2.4.1" - CACHE_NAME=JDK8_H241_CO - jdk: "openjdk8" env: - TEST="libraries" - - PROFILE="-Dhadoop.version=2.4.1 -Dscala-2.10" + - PROFILE="-Dhadoop.version=2.4.1" - CACHE_NAME=JDK8_H241_L - jdk: "openjdk8" env: - TEST="connectors" - - PROFILE="-Dhadoop.version=2.4.1 -Dscala-2.10 -Pinclude-kinesis" + - PROFILE="-Dhadoop.version=2.4.1 -Pinclude-kinesis" - CACHE_NAME=JDK8_H241_CN - jdk: "openjdk8" env: - TEST="tests" - - PROFILE="-Dhadoop.version=2.4.1 -Dscala-2.10" + - PROFILE="-Dhadoop.version=2.4.1" - CACHE_NAME=JDK8_H241_T - jdk: "openjdk8" env: - TEST="misc" - - PROFILE="-Dhadoop.version=2.4.1 -Dscala-2.10" + - PROFILE="-Dhadoop.version=2.4.1" - CACHE_NAME=JDK8_H241_M git: diff --git a/docs/start/building.md b/docs/start/building.md index 01dc4ed9b08b1e9a41822e30d176db04a3d35904..1478dfd54618ed58968a0147555e5c6619d95dd9 100644 --- a/docs/start/building.md +++ b/docs/start/building.md @@ -115,19 +115,6 @@ The `-Pvendor-repos` activates a Maven [build profile](http://maven.apache.org/g Flink has APIs, libraries, and runtime modules written in [Scala](http://scala-lang.org). Users of the Scala API and libraries may have to match the Scala version of Flink with the Scala version of their projects (because Scala is not strictly backwards compatible). -**By default, Flink is built with the Scala 2.11**. To build Flink with Scala *2.10*, you can change the default Scala *binary version* by using *scala-2.10* build profile: - -~~~bash -# Build with Scala version 2.10 -mvn clean install -DskipTests -Pscala-2.10 -~~~ - -To build against custom Scala versions, you need to define new custom build profile that will override *scala.version* and *scala.binary.version* values. - -Flink is developed against Scala *2.11* and tested additionally against Scala *2.10*. These two versions are known to be compatible. Earlier versions (like Scala *2.9*) are *not* compatible. - -Newer versions may be compatible, depending on breaking changes in the language features used by Flink, and the availability of Flink's dependencies in those Scala versions. The dependencies written in Scala include for example *Kafka*, *Akka*, *Scalatest*, and *scopt*. - {% top %} ## Encrypted File Systems diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala index 54877bac9bf6729ac3b42b462e88b6b221e4a3e3..7e360f94692caefe471bd2b1e5490de43551580d 100644 --- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala +++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala @@ -892,7 +892,7 @@ abstract class TableEnvironment(val config: TableConfig) { throw new TableException("Field name can not be '*'.") } - (fieldNames.toArray, fieldIndexes.toArray) // build fails in Scala 2.10 if not converted + (fieldNames, fieldIndexes) } protected def generateRowConverterFunction[OUT]( diff --git a/flink-scala-shell/pom.xml b/flink-scala-shell/pom.xml index 0d925ed522e34b97246b0118eec1c30cf236660a..15f10c715ef3c24bc35b328048abe414f9208096 100644 --- a/flink-scala-shell/pom.xml +++ b/flink-scala-shell/pom.xml @@ -209,29 +209,4 @@ under the License. - - - scala-2.10 - - - scala-2.10 - - - - - - org.scalamacros - quasiquotes_2.10 - ${scala.macros.version} - - - - org.scala-lang - jline - 2.10.4 - - - - - diff --git a/flink-scala-shell/src/main/scala-2.10/org/apache/flink/api/scala/ILoopCompat.scala b/flink-scala-shell/src/main/scala-2.10/org/apache/flink/api/scala/ILoopCompat.scala deleted file mode 100644 index 7751751a1cb6056deb7d4ab3b202582fd8316b0b..0000000000000000000000000000000000000000 --- a/flink-scala-shell/src/main/scala-2.10/org/apache/flink/api/scala/ILoopCompat.scala +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.flink.api.scala - -import java.io.BufferedReader - -import _root_.scala.tools.nsc.interpreter._ - -class ILoopCompat( - in0: Option[BufferedReader], - out0: JPrintWriter) - extends ILoop(in0, out0) { - - override def prompt = "Scala-Flink> " -} diff --git a/flink-scala-shell/src/main/scala-2.11/org/apache/flink/api/scala/ILoopCompat.scala b/flink-scala-shell/src/main/scala-2.11/org/apache/flink/api/scala/ILoopCompat.scala deleted file mode 100644 index 1c395bb1e414528ff8beb95c6f0a5f4f3c5f6bb8..0000000000000000000000000000000000000000 --- a/flink-scala-shell/src/main/scala-2.11/org/apache/flink/api/scala/ILoopCompat.scala +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.flink.api.scala - -import java.io.BufferedReader - -import _root_.scala.tools.nsc.interpreter._ -import _root_.scala.io.AnsiColor.{MAGENTA, RESET} - -class ILoopCompat( - in0: Option[BufferedReader], - out0: JPrintWriter) - extends ILoop(in0, out0) { - - override def prompt = { - val promptStr = "Scala-Flink> " - s"$MAGENTA$promptStr$RESET" - } - - protected def addThunk(f: => Unit): Unit = f -} diff --git a/flink-scala-shell/src/main/scala/org/apache/flink/api/scala/FlinkILoop.scala b/flink-scala-shell/src/main/scala/org/apache/flink/api/scala/FlinkILoop.scala index e02c2b09582ad1ee96e76298aa267661d0b47b53..4b6e886994abc10ad39ba16cf29762d665ac1bb4 100644 --- a/flink-scala-shell/src/main/scala/org/apache/flink/api/scala/FlinkILoop.scala +++ b/flink-scala-shell/src/main/scala/org/apache/flink/api/scala/FlinkILoop.scala @@ -35,7 +35,7 @@ class FlinkILoop( val externalJars: Option[Array[String]], in0: Option[BufferedReader], out0: JPrintWriter) - extends ILoopCompat(in0, out0) { + extends ILoop(in0, out0) { def this( host: String, @@ -145,15 +145,13 @@ class FlinkILoop( override def createInterpreter(): Unit = { super.createInterpreter() - addThunk { - intp.beQuietDuring { - // import dependencies - intp.interpret("import " + packageImports.mkString(", ")) + intp.beQuietDuring { + // import dependencies + intp.interpret("import " + packageImports.mkString(", ")) - // set execution environment - intp.bind("benv", this.scalaBenv) - intp.bind("senv", this.scalaSenv) - } + // set execution environment + intp.bind("benv", this.scalaBenv) + intp.bind("senv", this.scalaSenv) } } diff --git a/flink-scala/pom.xml b/flink-scala/pom.xml index 93152df9e62adb0f9ca26979b816675b38c07b60..f132145cc4237d20077fb4f6ff42fa7d5fc00fb1 100644 --- a/flink-scala/pom.xml +++ b/flink-scala/pom.xml @@ -256,24 +256,4 @@ under the License. - - - - scala-2.10 - - - scala-2.10 - - - - - - org.scalamacros - quasiquotes_2.10 - ${scala.macros.version} - - - - - diff --git a/pom.xml b/pom.xml index 0e53b7c7caafc56d0255cd2dd3e67d9088c35f41..b85189f669ff91695cdc3252f4d17141694ee0f6 100644 --- a/pom.xml +++ b/pom.xml @@ -528,20 +528,6 @@ under the License. - - - - scala-2.10 - - - scala-2.10 - - - - 2.10.6 - 2.10 - - spotbugs diff --git a/tools/create_release_files.sh b/tools/create_release_files.sh index 48641c05e4e28a0e0ac835e703a9c69a15ba7c35..5d134e81ef3dda843d6bc8274e482e35610079cd 100755 --- a/tools/create_release_files.sh +++ b/tools/create_release_files.sh @@ -241,14 +241,9 @@ deploy_to_maven() { cd flink cp ../../deploysettings.xml . - + echo "Deploying Scala 2.11 version" $MVN clean deploy -Prelease,docs-and-source,scala-2.11 --settings deploysettings.xml -DskipTests -Dgpg.executable=$GPG -Dgpg.keyname=$GPG_KEY -Dgpg.passphrase=$GPG_PASSPHRASE -DretryFailedDeploymentCount=10 - - # It is important to first deploy scala 2.11 and then scala 2.10 so that the quickstarts (which are independent of the scala version) - # are depending on scala 2.10. - echo "Deploying Scala 2.10 version" - $MVN clean deploy -Prelease,docs-and-source,scala-2.10 --settings deploysettings.xml -DskipTests -Dgpg.executable=$GPG -Dgpg.keyname=$GPG_KEY -Dgpg.passphrase=$GPG_PASSPHRASE -DretryFailedDeploymentCount=10 } copy_data() { @@ -273,18 +268,12 @@ make_source_release # build dist by input parameter of "--scala-vervion xxx --hadoop-version xxx" if [ "$SCALA_VERSION" == "none" ] && [ "$HADOOP_VERSION" == "none" ]; then - make_binary_release "hadoop2" "" "2.10" - make_binary_release "hadoop26" "-Dhadoop.version=2.6.5" "2.10" - make_binary_release "hadoop27" "-Dhadoop.version=2.7.3" "2.10" - make_binary_release "hadoop28" "-Dhadoop.version=2.8.0" "2.10" - make_binary_release "hadoop2" "" "2.11" make_binary_release "hadoop26" "-Dhadoop.version=2.6.5" "2.11" make_binary_release "hadoop27" "-Dhadoop.version=2.7.3" "2.11" make_binary_release "hadoop28" "-Dhadoop.version=2.8.0" "2.11" elif [ "$SCALA_VERSION" == none ] && [ "$HADOOP_VERSION" != "none" ] then - make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.10" make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.11" elif [ "$SCALA_VERSION" != none ] && [ "$HADOOP_VERSION" == "none" ] then diff --git a/tools/deploy_to_maven.sh b/tools/deploy_to_maven.sh index 2397bd3fdef41b8823b1fe3e7fdef0da89c4a7af..aef140ddce55a764be920bd3a73d3f6ae2c49ca7 100755 --- a/tools/deploy_to_maven.sh +++ b/tools/deploy_to_maven.sh @@ -87,15 +87,10 @@ if [[ $CURRENT_FLINK_VERSION == *SNAPSHOT* ]] ; then MVN_SNAPSHOT_OPTS="-B -Pdocs-and-source -DskipTests -Drat.skip=true -Drat.ignoreErrors=true \ -DretryFailedDeploymentCount=10 --settings deploysettings.xml clean deploy" - # hadoop2 scala 2.10 - echo "deploy standard version (hadoop2) for scala 2.10" - mvn ${MVN_SNAPSHOT_OPTS} -Pscala-2.10 - deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop2" - # hadoop2 scala 2.11 - echo "deploy hadoop2 version (standard) for scala 2.11" + echo "deploy standard version (hadoop2) for scala 2.11" mvn ${MVN_SNAPSHOT_OPTS} -Pscala-2.11 - deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop2_2.11" + deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop2" exit 0 else diff --git a/tools/releasing/create_binary_release.sh b/tools/releasing/create_binary_release.sh index 0defd1b546ab11c71b3026f6dd9e0e7433e637d7..42b5a8e9080465ec598322b21bc06e5defd693ca 100755 --- a/tools/releasing/create_binary_release.sh +++ b/tools/releasing/create_binary_release.sh @@ -78,18 +78,12 @@ cd .. if [ "$SCALA_VERSION" == "none" ] && [ "$HADOOP_VERSION" == "none" ]; then - make_binary_release "hadoop2" "" "2.10" - make_binary_release "hadoop26" "-Dhadoop.version=2.6.5" "2.10" - make_binary_release "hadoop27" "-Dhadoop.version=2.7.3" "2.10" - make_binary_release "hadoop28" "-Dhadoop.version=2.8.0" "2.10" - make_binary_release "hadoop2" "" "2.11" make_binary_release "hadoop26" "-Dhadoop.version=2.6.5" "2.11" make_binary_release "hadoop27" "-Dhadoop.version=2.7.3" "2.11" make_binary_release "hadoop28" "-Dhadoop.version=2.8.0" "2.11" elif [ "$SCALA_VERSION" == none ] && [ "$HADOOP_VERSION" != "none" ] then - make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.10" make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.11" elif [ "$SCALA_VERSION" != none ] && [ "$HADOOP_VERSION" == "none" ] then diff --git a/tools/releasing/deploy_staging_jars.sh b/tools/releasing/deploy_staging_jars.sh index a379f8f6b0896e8e8b6a63d6dd02919d404ded31..9245bdde413bcf0310f73773fe1c6bc882c6ab5c 100755 --- a/tools/releasing/deploy_staging_jars.sh +++ b/tools/releasing/deploy_staging_jars.sh @@ -43,9 +43,3 @@ echo "Deploying to repository.apache.org" echo "Deploying Scala 2.11 version" $MVN clean deploy -Prelease,docs-and-source,scala-2.11 -DskipTests -DretryFailedDeploymentCount=10 -# It is important to first deploy scala 2.11 and then scala 2.10 so that the quickstarts (which are independent of the scala version) -# are depending on scala 2.10. - -echo "Deploying Scala 2.10 version" -$MVN clean deploy -Prelease,docs-and-source,scala-2.10 -DskipTests -DretryFailedDeploymentCount=10 -