Skip to content

Commit

Permalink
[FLINK-13065][datastream][docs] Clarify key selector example
Browse files Browse the repository at this point in the history
  • Loading branch information
mans2singh authored and zentol committed Oct 4, 2019
1 parent 3f495d8 commit 28c5264
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/dev/stream/state/broadcast_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Starting from the stream of `Items`, we just need to *key it* by `Color`, as we
make sure that elements of the same color end up on the same physical machine.

{% highlight java %}
// key the shapes by color
KeyedStream<Item, Color> colorPartitionedStream = shapeStream
.keyBy(new KeySelector<Shape, Color>(){...});
// key the items by color
KeyedStream<Item, Color> colorPartitionedStream = itemStream
.keyBy(new KeySelector<Item, Color>(){...});
{% endhighlight %}

Moving on to the `Rules`, the stream containing them should be broadcasted to all downstream tasks, and these tasks
Expand Down
6 changes: 3 additions & 3 deletions docs/dev/stream/state/broadcast_state.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Starting from the stream of `Items`, we just need to *key it* by `Color`, as we
make sure that elements of the same color end up on the same physical machine.

{% highlight java %}
// key the shapes by color
KeyedStream<Item, Color> colorPartitionedStream = shapeStream
.keyBy(new KeySelector<Shape, Color>(){...});
// key the items by color
KeyedStream<Item, Color> colorPartitionedStream = itemStream
.keyBy(new KeySelector<Item, Color>(){...});
{% endhighlight %}

Moving on to the `Rules`, the stream containing them should be broadcasted to all downstream tasks, and these tasks
Expand Down

0 comments on commit 28c5264

Please sign in to comment.