[
https://issues.apache.org/jira/browse/FLINK-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14554281#comment-14554281
]
Aljoscha Krettek commented on FLINK-2074:
-----------------------------------------
You can try it with this modified example:
{code}
public class WindowWordCount {
public static void main(String[] args) throws Exception {
final StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(1);
DataStream<String> text = env.socketTextStream("localhost",
9999);
text.flatMap(new WordCount.Tokenizer())
.window(Time.of(4,
TimeUnit.SECONDS)).every(Time.of(2, TimeUnit.SECONDS))
.sum(1)
.flatten()
.print();
env.execute("WindowWordCount");
}
}
{code}
Start the socket, emit some values, pause, emit some more values, pause. Then
the window keeps emitting.
> Sliding Window Keeps Emitting Elements After Source Stops Producing
> -------------------------------------------------------------------
>
> Key: FLINK-2074
> URL: https://issues.apache.org/jira/browse/FLINK-2074
> Project: Flink
> Issue Type: Bug
> Components: Streaming
> Affects Versions: 0.9
> Reporter: Aljoscha Krettek
> Priority: Blocker
>
> This happens when the source produces some elements, then the source stops
> for a while and then produces again some elements before stopping again.
> After this, the window will just keep emitting the last emitted element
> indefinitely.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)