[ 
https://issues.apache.org/jira/browse/BEAM-5097?focusedWorklogId=647602&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-647602
 ]

ASF GitHub Bot logged work on BEAM-5097:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Sep/21 22:16
            Start Date: 07/Sep/21 22:16
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on a change in pull request #15399:
URL: https://github.com/apache/beam/pull/15399#discussion_r703890203



##########
File path: sdks/go/examples/wordcount/wordcount.go
##########
@@ -123,6 +125,11 @@ func extractFn(ctx context.Context, line string, emit 
func(string)) {
                empty.Inc(ctx, 1)
        }
        for _, word := range wordRE.FindAllString(line, -1) {
+               // increment the counter for small words if length of words is
+               // less than small_word_length
+               if len(word) < *small_word_length {

Review comment:
       Flags aren't available on workers. They'd only have their default 
values. `extractFn` needs to change to a structural DoFn (like it is in the 
other example being updated) so the flag functions properly. 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 647602)
    Time Spent: 3h  (was: 2h 50m)

> Increment counter for "small words" in go SDK example
> -----------------------------------------------------
>
>                 Key: BEAM-5097
>                 URL: https://issues.apache.org/jira/browse/BEAM-5097
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go
>            Reporter: Holden Karau
>            Assignee: Ritesh Ghorse
>            Priority: P4
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Increment counter for "small words" in go SDK example



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to