Skip to content

Commit

Permalink
#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 Oct 5, 2018
1 parent 46fd584 commit 90862ba
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 90862ba

Please sign in to comment.