Apache Flink - Sum and Group in a DataStream
<p>Suppose I have records like this:</p>

<pre><code>("a-b", "data1", 1)
("a-c", "data2", 1)
("a-b", "data3", 1)
</code></pre>

<p>How can I group and sum in Apache Flink, such that I have the following results when the input is a DataStream?</p>

<pre><code>("a-b", ["data1", "data3"], 2)
("a-c", ["data2"], 1)
</code></pre>

<p>I only can think of either a solution by using {Time, Count}Windows and then grouping and applying transformations or by keeping the elements in an iteration stream (but this would need a lot of memory).</p>

<p>Regards, Kevin</p>