Details
-
Bug
-
Status: Resolved
-
P3
-
Resolution: Fixed
-
None
Description
The snippet in the javadoc of GroupedValues says:
PCollection<KV<String, Integer>> pc = ...; PCollection<KV<String, Iterable<Integer>>> groupedByKey = pc.apply( new GroupByKey<String, Integer>()); PCollection<KV<String, Integer>> sumByKey = groupedByKey.apply( Combine.<String, Integer>groupedValues( new Sum.SumIntegerFn()));
but should be:
PCollection<KV<String, Integer>> pc = ...; PCollection<KV<String, Iterable<Integer>>> groupedByKey = pc.apply(GroupByKey.create()); PCollection<KV<String, Integer>> sumByKey = groupedByKey.apply(Combine.groupedValues(Sum.ofIntegers()));
Attachments
Issue Links
- links to