Repository: flink Updated Branches: refs/heads/master cbaf4e5e4 -> 5b390028c
[hotfix] [doc] Fix error in ProcessFunction example. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/5b390028 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/5b390028 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/5b390028 Branch: refs/heads/master Commit: 5b390028c7d54deda055dac49dafa6662e1175e1 Parents: cbaf4e5 Author: kl0u <[email protected]> Authored: Fri Mar 10 23:34:56 2017 +0100 Committer: kl0u <[email protected]> Committed: Wed Mar 15 16:46:52 2017 +0100 ---------------------------------------------------------------------- docs/dev/stream/process_function.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/5b390028/docs/dev/stream/process_function.md ---------------------------------------------------------------------- diff --git a/docs/dev/stream/process_function.md b/docs/dev/stream/process_function.md index 25de9a4..d682a89 100644 --- a/docs/dev/stream/process_function.md +++ b/docs/dev/stream/process_function.md @@ -32,13 +32,13 @@ The `ProcessFunction` is a low-level stream processing operation, giving access all (acyclic) streaming applications: - events (stream elements) - - state (fault tolerant, consistent, only on keyed stream) + - state (fault-tolerant, consistent, only on keyed stream) - timers (event time and processing time, only on keyed stream) The `ProcessFunction` can be thought of as a `FlatMapFunction` with access to keyed state and timers. It handles events by being invoked for each event received in the input stream(s). -For fault tolerant state, the `ProcessFunction` gives access to Flink's [keyed state](state.html), accessible via the +For fault-tolerant state, the `ProcessFunction` gives access to Flink's [keyed state](state.html), accessible via the `RuntimeContext`, similar to the way other stateful functions can access keyed state. The timers allow applications to react to changes in processing time and in [event time](../event_time.html). @@ -225,7 +225,7 @@ class CountWithTimeoutFunction extends ProcessFunction[(String, String), (String override def onTimer(timestamp: Long, ctx: OnTimerContext, out: Collector[(String, Long)]): Unit = { state.value match { - case CountWithTimestamp(key, count, lastModified) if (lastModified == timestamp + 60000) => + case CountWithTimestamp(key, count, lastModified) if (timestamp == lastModified + 60000) => out.collect((key, count)) case _ => }
