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]