You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by uc...@apache.org on 2015/12/06 16:17:47 UTC

[2/2] flink git commit: [docs] Add import statements to DataStream example programs (Java/Scala)

[docs] Add import statements to DataStream example programs (Java/Scala)

New users sometimes struggle with the imports (especially for Scala API).


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

Branch: refs/heads/release-0.10
Commit: 33efba66849d7da1a5b7238284451bf2170c6214
Parents: 2afe600
Author: Ufuk Celebi <uc...@apache.org>
Authored: Sun Dec 6 15:40:59 2015 +0100
Committer: Ufuk Celebi <uc...@apache.org>
Committed: Sun Dec 6 16:17:22 2015 +0100

----------------------------------------------------------------------
 docs/apis/streaming_guide.md | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/33efba66/docs/apis/streaming_guide.md
----------------------------------------------------------------------
diff --git a/docs/apis/streaming_guide.md b/docs/apis/streaming_guide.md
index 6bb8961..2500a19 100644
--- a/docs/apis/streaming_guide.md
+++ b/docs/apis/streaming_guide.md
@@ -50,6 +50,13 @@ words coming from a web socket in 5 second windows. You can copy &amp; paste the
 <div data-lang="java" markdown="1">
 
 {% highlight java %}
+import org.apache.flink.api.common.functions.FlatMapFunction;
+import org.apache.flink.api.java.tuple.Tuple2;
+import org.apache.flink.streaming.api.datastream.DataStream;
+import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
+import org.apache.flink.streaming.api.windowing.time.Time;
+import org.apache.flink.util.Collector;
+
 public class WindowWordCount {
 
     public static void main(String[] args) throws Exception {
@@ -84,6 +91,10 @@ public class WindowWordCount {
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
+import java.util.concurrent.TimeUnit
+
+import org.apache.flink.streaming.api.scala._
+import org.apache.flink.streaming.api.windowing.time.Time
 
 object WindowWordCount {
   def main(args: Array[String]) {