flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject flink git commit: [FLINK-1856][doc] Add notice about implicit TypeInformation
Date Fri, 17 Apr 2015 07:03:01 GMT
Repository: flink
Updated Branches:
  refs/heads/master 8c5cd9735 -> c2faa6fe3


[FLINK-1856][doc] Add notice about implicit TypeInformation


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

Branch: refs/heads/master
Commit: c2faa6fe3aca39d9648a7e4b57ef797746c28aa9
Parents: 8c5cd97
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Mon Apr 13 12:34:51 2015 +0200
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Fri Apr 17 09:02:47 2015 +0200

----------------------------------------------------------------------
 docs/programming_guide.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/c2faa6fe/docs/programming_guide.md
----------------------------------------------------------------------
diff --git a/docs/programming_guide.md b/docs/programming_guide.md
index d69a303..8638af2 100644
--- a/docs/programming_guide.md
+++ b/docs/programming_guide.md
@@ -87,6 +87,8 @@ public class WordCountExample {
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
+import org.apache.flink.api.scala._
+
 object WordCount {
   def main(args: Array[String]) {
 
@@ -174,6 +176,21 @@ If you want to add Flink to an existing Maven project, add the following
entry t
   <version>{{site.FLINK_VERSION_SHORT }}</version>
 </dependency>
 {% endhighlight %}
+
+**Important:** When working with the Scala API you must have one of these two imports:
+{% highlight scala %}
+import org.apache.flink.api.scala._
+{% endhighlight %}
+
+or
+
+{% highlight scala %}
+import org.apache.flink.api.scala.createTypeInformation
+{% endhighlight %}
+
+The reason is that Flink analyzes the types that are used in a program and generates serializers
+and comparaters for them. By having either of those imports you enable an implicit conversion
+that creates the type information for Flink operations.
 </div>
 </div>
 


Mime
View raw message