You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2017/09/25 08:57:31 UTC

flink git commit: [hotfix] Fix typos and other small things

Repository: flink
Updated Branches:
  refs/heads/master cb615f1bc -> d8ed58b6a


[hotfix] Fix typos and other small things


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

Branch: refs/heads/master
Commit: d8ed58b6af6c555b65aaf9474e30de35b2dfb0a4
Parents: cb615f1
Author: Bowen Li <bo...@gmail.com>
Authored: Fri Sep 22 11:36:18 2017 -0700
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Mon Sep 25 10:56:23 2017 +0200

----------------------------------------------------------------------
 docs/dev/stream/operators/windows.md            | 24 +++++++++++---------
 .../api/java/functions/NullByteKeySelector.java |  2 +-
 .../examples/sideoutput/SideOutputExample.java  |  2 +-
 .../api/datastream/AllWindowedStream.java       | 13 +++++++----
 4 files changed, 23 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d8ed58b6/docs/dev/stream/operators/windows.md
----------------------------------------------------------------------
diff --git a/docs/dev/stream/operators/windows.md b/docs/dev/stream/operators/windows.md
index 012d531..b825876 100644
--- a/docs/dev/stream/operators/windows.md
+++ b/docs/dev/stream/operators/windows.md
@@ -35,21 +35,23 @@ for the rest of the page.
 **Keyed Windows**
 
     stream
-           .keyBy(...)          <-  keyed versus non-keyed windows
-           .window(...)         <-  required: "assigner"
-          [.trigger(...)]       <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]       <-  optional: "evictor" (else no evictor)
-          [.allowedLateness()]  <-  optional, else zero
-           .reduce/fold/apply() <-  required: "function"
+           .keyBy(...)               <-  keyed versus non-keyed windows
+           .window(...)              <-  required: "assigner"
+          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
+          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
+          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
+          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
+           .reduce/fold/apply()      <-  required: "function"
 
 **Non-Keyed Windows**
 
     stream
-           .windowAll(...)      <-  required: "assigner"
-          [.trigger(...)]       <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]       <-  optional: "evictor" (else no evictor)
-          [.allowedLateness()]  <-  optional, else zero
-           .reduce/fold/apply() <-  required: "function"
+           .windowAll(...)           <-  required: "assigner"
+          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
+          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
+          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
+          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
+           .reduce/fold/apply()      <-  required: "function"
 
 In the above, the commands in square brackets ([...]) are optional. This reveals that Flink allows you to customize your
 windowing logic in many different ways so that it best fits your needs.

http://git-wip-us.apache.org/repos/asf/flink/blob/d8ed58b6/flink-core/src/main/java/org/apache/flink/api/java/functions/NullByteKeySelector.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/java/functions/NullByteKeySelector.java b/flink-core/src/main/java/org/apache/flink/api/java/functions/NullByteKeySelector.java
index 4aa533d..f521cfe 100644
--- a/flink-core/src/main/java/org/apache/flink/api/java/functions/NullByteKeySelector.java
+++ b/flink-core/src/main/java/org/apache/flink/api/java/functions/NullByteKeySelector.java
@@ -22,7 +22,7 @@ import org.apache.flink.annotation.Internal;
 
 /**
  * Used as a dummy {@link KeySelector} to allow using keyed operators
- * for non-keyed usecases. Essentially, it gives all incoming records
+ * for non-keyed use cases. Essentially, it gives all incoming records
  * the same key, which is a {@code (byte) 0} value.
  *
  * @param <T> The type of the input element.

http://git-wip-us.apache.org/repos/asf/flink/blob/d8ed58b6/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
----------------------------------------------------------------------
diff --git a/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java b/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
index 0cb8930..dca7389 100644
--- a/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
+++ b/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
@@ -35,7 +35,7 @@ import org.apache.flink.util.OutputTag;
 /**
  * An example that illustrates the use of side outputs.
  *
- * <p>This is a modified version of {@link WindowWordCount}
+ * <p>This is a modified version of {@link org.apache.flink.streaming.examples.windowing.WindowWordCount}
  * that has a filter in the tokenizer and only emits some words for counting
  * while emitting the other words to a side output.
  */

http://git-wip-us.apache.org/repos/asf/flink/blob/d8ed58b6/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
index b0f31e1..7fb3822 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
@@ -79,10 +79,10 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
  * <p>If an {@link org.apache.flink.streaming.api.windowing.evictors.Evictor} is specified it will be
  * used to evict elements from the window after
  * evaluation was triggered by the {@code Trigger} but before the actual evaluation of the window.
- * When using an evictor window performance will degrade significantly, since
+ * When using an evictor, window performance will degrade significantly, since
  * pre-aggregation of window results cannot be used.
  *
- * <p>Note that the {@code AllWindowedStream} is purely and API construct, during runtime
+ * <p>Note that the {@code AllWindowedStream} is purely an API construct, during runtime
  * the {@code AllWindowedStream} will be collapsed together with the
  * operation over the window into one single operation.
  *
@@ -108,8 +108,7 @@ public class AllWindowedStream<T, W extends Window> {
 	private long allowedLateness = 0L;
 
 	/**
-	 * Side output {@code OutputTag} for late data. If no tag is set late data will simply be
-	 * dropped.
+	 * Side output {@code OutputTag} for late data. If no tag is set late data will simply be dropped.
 	 */
 	private OutputTag<T> lateDataOutputTag;
 
@@ -254,7 +253,11 @@ public class AllWindowedStream<T, W extends Window> {
 	 * @return The data stream that is the result of applying the window function to the window.
 	 */
 	@PublicEvolving
-	public <R> SingleOutputStreamOperator<R> reduce(ReduceFunction<T> reduceFunction, AllWindowFunction<T, R, W> function, TypeInformation<R> resultType) {
+	public <R> SingleOutputStreamOperator<R> reduce(
+			ReduceFunction<T> reduceFunction,
+			AllWindowFunction<T, R, W> function,
+			TypeInformation<R> resultType) {
+
 		if (reduceFunction instanceof RichFunction) {
 			throw new UnsupportedOperationException("ReduceFunction of reduce can not be a RichFunction.");
 		}