Skip to content

Commit

Permalink
apache#13 Fix race condition in batch ReduceStateByKeyTranslator
Browse files Browse the repository at this point in the history
  • Loading branch information
vanekjar authored and David Moravek committed May 15, 2018
1 parent dd615a2 commit c9ab3c2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,11 @@ public DataSet translate(FlinkOperator<ReduceByKey> operator,
static class RBKKeySelector
implements KeySelector<BatchElement<Window, Pair>, Integer> {

private final Tuple2 tuple = new Tuple2();

@Override
public Integer getKey(
BatchElement<Window, Pair> value) {

Tuple2 tuple = new Tuple2();
tuple.f0 = value.getWindow();
tuple.f1 = value.getElement().getFirst();
return tuple.hashCode();
Expand Down

0 comments on commit c9ab3c2

Please sign in to comment.