Skip to content

Commit

Permalink
[hotfix] [docs] Improve description of keyBy().
Browse files Browse the repository at this point in the history
  • Loading branch information
fhueske committed Apr 5, 2018
1 parent 7b0fc58 commit 7712c02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/dev/stream/operators/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ dataStream.filter(new FilterFunction<Integer>() {
<tr>
<td><strong>KeyBy</strong><br>DataStream &rarr; KeyedStream</td>
<td>
<p>Logically partitions a stream into disjoint partitions, each partition containing elements of the same key.
Internally, this is implemented with hash partitioning. See <a href="{{ site.baseurl }}/dev/api_concepts.html#specifying-keys">keys</a> on how to specify keys.
This transformation returns a KeyedStream.</p>
<p>Logically partitions a stream into disjoint partitions. All records with the same key are assigned to the same partition. Internally, <em>keyBy()</em> is implemented with hash partitioning. There are different ways to <a href="{{ site.baseurl }}/dev/api_concepts.html#specifying-keys">specify keys</a>.</p>
<p>
This transformation returns a <em>KeyedStream</em>, which is, among other things, required to use <a href="{{ site.baseurl }}/dev/stream/state/state.html#keyed-state">keyed state</a>. </p>
{% highlight java %}
dataStream.keyBy("someKey") // Key by field "someKey"
dataStream.keyBy(0) // Key by the first element of a Tuple
Expand Down

0 comments on commit 7712c02

Please sign in to comment.