[ 
https://issues.apache.org/jira/browse/BEAM-7682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ismaël Mejía updated BEAM-7682:
-------------------------------
    Status: Open  (was: Triage Needed)

> Combine.GroupedValues javadoc code snippet does not work
> --------------------------------------------------------
>
>                 Key: BEAM-7682
>                 URL: https://issues.apache.org/jira/browse/BEAM-7682
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: Minor
>
> The snippet in the javadoc of GroupedValues says:
> {code:java}
> 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()));
> {code}
> but should be:
> {code:java}
> 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()));
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to