[ https://issues.apache.org/jira/browse/BEAM-5097?focusedWorklogId=131641&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-131641 ]
ASF GitHub Bot logged work on BEAM-5097: ---------------------------------------- Author: ASF GitHub Bot Created on: 06/Aug/18 22:40 Start Date: 06/Aug/18 22:40 Worklog Time Spent: 10m Work Description: holdenk commented on a change in pull request #6157: [BEAM-5097] Add counter to combine example in go sdk URL: https://github.com/apache/beam/pull/6157#discussion_r208050043 ########## File path: sdks/go/examples/cookbook/combine/combine.go ########## @@ -63,11 +63,16 @@ type extractFn struct { MinLength int `json:"min_length"` } +// A global context for simplicity. +var ctx = context.Background() + func (f *extractFn) ProcessElement(row WordRow, emit func(string, string)) { + small_words := beam.NewCounter("example.namespace", "small_words") Review comment: Sounds good. @herohde pointed out the WC example uses counters too so I'm going to go take a look at that as well. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 131641) Time Spent: 1h (was: 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: holdenk > Assignee: holdenk > Priority: Trivial > Time Spent: 1h > Remaining Estimate: 0h > > Increment counter for "small words" in go SDK example -- This message was sent by Atlassian JIRA (v7.6.3#76005)