You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2015/08/27 23:37:31 UTC

[3/5] flink git commit: [FLINK-2582] [docs] Add documentation how to build Flink against different Scala versions

[FLINK-2582] [docs] Add documentation how to build Flink against different Scala versions

This closes #1070


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/bc63ef2c
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/bc63ef2c
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/bc63ef2c

Branch: refs/heads/master
Commit: bc63ef2c122a842bf2a98eb5813d16b5d43fa19d
Parents: 8cf8736
Author: Stephan Ewen <se...@apache.org>
Authored: Thu Aug 27 15:16:10 2015 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Thu Aug 27 19:47:37 2015 +0200

----------------------------------------------------------------------
 docs/_includes/navbar.html |  2 +-
 docs/setup/building.md     | 33 ++++++++++++++++++++++++++++++---
 2 files changed, 31 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/bc63ef2c/docs/_includes/navbar.html
----------------------------------------------------------------------
diff --git a/docs/_includes/navbar.html b/docs/_includes/navbar.html
index 26ad740..84cc6bc 100644
--- a/docs/_includes/navbar.html
+++ b/docs/_includes/navbar.html
@@ -44,7 +44,7 @@ under the License.
             <li class="dropdown{% if page.url contains setup %} active{% endif %}">
               <a href="{{ setup }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Setup <span class="caret"></span></a>
               <ul class="dropdown-menu" role="menu">
-                <li><a href="{{ setup }}/building.html">Get Flink {{ site.version }}</a></li>
+                <li><a href="{{ setup }}/building.html">Build Flink {{ site.version }}</a></li>
 
                 <li class="divider"></li>
                 <li role="presentation" class="dropdown-header"><strong>Deployment</strong></li>

http://git-wip-us.apache.org/repos/asf/flink/blob/bc63ef2c/docs/setup/building.md
----------------------------------------------------------------------
diff --git a/docs/setup/building.md b/docs/setup/building.md
index 2fcf412..2581812 100644
--- a/docs/setup/building.md
+++ b/docs/setup/building.md
@@ -20,7 +20,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-In order to build Flink, you need the source code. Either download the source of a release or clone the git repository. In addition to that, you need Maven 3 and a JDK (Java Development Kit). Note that you can not build Flink with Oracle JDK 6 due to a unresolved bug in the Oracle Java compiler. It works well with OpenJDK 6 and all Java 7 and 8 compilers.
+In order to build Flink, you need the source code. Either download the source of a release or clone the git repository. In addition to that, you need Maven 3 and a JDK (Java Development Kit).
+Flink requires at least Java 7 to build. We recommend using Java 8.
 
 To clone from git, enter:
 
@@ -48,8 +49,8 @@ This section covers building Flink for a specific Hadoop version. Most users do
 The problem is that Flink uses HDFS and YARN which are both dependencies from Apache Hadoop. There exist many different versions of Hadoop (from both the upstream project and the different Hadoop distributions). If a user is using a wrong combination of versions, exceptions like this one occur:
 
 ~~~bash
-ERROR: The job was not successfully submitted to the nephele job manager:
-    org.apache.flink.nephele.executiongraph.GraphConversionException: Cannot compute input splits for TSV:
+ERROR: Job execution failed.
+    org.apache.flink.runtime.client.JobExecutionException: Cannot initialize task 'TextInputFormat(/my/path)':
     java.io.IOException: Failed on local exception: com.google.protobuf.InvalidProtocolBufferException:
     Protocol message contained an invalid tag (zero).; Host Details :
 ~~~
@@ -95,6 +96,32 @@ So if you are building Flink for Hadoop `2.0.0-alpha`, use the following command
 -P!include-yarn -Dhadoop.version=2.0.0-alpha
 ~~~
 
+
+## Build Flink for a specific Scala Version
+
+**Note:** Users that purely use the Java APIs and libraries can ignore this section.
+
+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 Scala *2.10*. To build Flink with Scala *2.11*, append the `-Dscala-2.11` option to your build command:
+
+~~~bash
+mvn clean install -DskipTests -Dscala-2.11
+~~~
+
+
+To build against custom Scala versions, you need to supply the *language version* and the *binary version* as properties to the build:
+
+~~~bash
+mvn clean install -DskipTests -Dscala.version=2.11.4 -Dscala.binary.version=2.11
+~~~
+
+Flink is developed against Scala *2.10*, and tested additionally against Scala *2.11*. 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*.
+
+
 ## Background
 
 The builds with Maven are controlled by [properties](http://maven.apache.org/pom.html#Properties) and <a href="http://maven.apache.org/guides/introduction/introduction-to-profiles.html">build profiles</a>.