[
https://issues.apache.org/jira/browse/BEAM-7682?focusedWorklogId=271594&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271594
]
ASF GitHub Bot logged work on BEAM-7682:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Jul/19 12:28
Start Date: 03/Jul/19 12:28
Worklog Time Spent: 10m
Work Description: iemejia commented on issue #8995: [BEAM-7682] Fix
Combine.GroupedValues javadoc code snippet
URL: https://github.com/apache/beam/pull/8995#issuecomment-508071700
Run Java PreCommit
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 271594)
Time Spent: 20m (was: 10m)
> 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
> Labels: documentation, javadoc
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)