Skip to content

Commit

Permalink
Merge pull request apache#13 from seznam/vasek/fipping-sumbykey
Browse files Browse the repository at this point in the history
[BEAM-4609]  Flipping tests
  • Loading branch information
mareksimunek authored Jun 22, 2018
2 parents 529d05d + eac573d commit 1dc0b42
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ private static <InputT, OutputT> SerializableFunction<Iterable<InputT>, InputT>

@SuppressWarnings("unchecked") final ReduceFunctor<InputT, InputT> combiner =
(ReduceFunctor<InputT, InputT>) reducer;
final SingleValueCollector<InputT> collector = new SingleValueCollector<>();

return (Iterable<InputT> input) -> {
SingleValueCollector<InputT> collector = new SingleValueCollector<>();
combiner.apply(StreamSupport.stream(input.spliterator(), false), collector);
return collector.get();
};
Expand Down Expand Up @@ -153,8 +154,8 @@ public void processElement(ProcessContext ctx) {
}

/**
* Translation of {@link Collector} collect to Beam's context output. OperatorName serve
* as namespace for Beam's metrics.
* Translation of {@link Collector} collect to Beam's context output. OperatorName serve as
* namespace for Beam's metrics.
*/
private static class Collector<K, V, OutT>
implements DoFnCollector.BeamCollector<KV<K, Iterable<V>>, Pair<K, OutT>, OutT> {
Expand Down

0 comments on commit 1dc0b42

Please sign in to comment.