You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/05/14 00:06:00 UTC

[jira] [Work logged] (BEAM-9951) Create Go SDK synthetic sources.

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

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

                Author: ASF GitHub Bot
            Created on: 14/May/20 00:05
            Start Date: 14/May/20 00:05
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on a change in pull request #11665:
URL: https://github.com/apache/beam/pull/11665#discussion_r424798718



##########
File path: sdks/go/examples/stringsplit/stringsplit.go
##########
@@ -112,15 +112,15 @@ func (fn *StringSplitFn) CreateTracker(rest offsetrange.Restriction) *offsetrang
 //
 // Example: If BufSize is 100, then a restriction of 75 to 325 should emit the
 // following substrings: [100, 200], [200, 300], [300, 400]
-func (fn *StringSplitFn) ProcessElement(rt *offsetrange.Tracker, elem string, emit func(string)) {
-	log.Debugf(context.Background(), "StringSplit ProcessElement: Tracker = %v", rt)
+func (fn *StringSplitFn) ProcessElement(ctx context.Context, rt *offsetrange.Tracker, elem string, emit func(string)) {
+	log.Debugf(ctx, "StringSplit ProcessElement: Tracker = %v", rt)
 	i := rt.Rest.Start
 	if rem := i % fn.BufSize; rem != 0 {
 		i += fn.BufSize - rem // Skip to next multiple of BufSize.
 	}
 	strEnd := int64(len(elem))
 
-	for ok := rt.TryClaim(i); ok == true; ok = rt.TryClaim(i) {
+	for rt.TryClaim(i) == true {

Review comment:
       It takes two. :P 




----------------------------------------------------------------
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:
users@infra.apache.org


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

            Worklog Id:     (was: 432909)
    Remaining Estimate: 0h
            Time Spent: 10m

> Create Go SDK synthetic sources.
> --------------------------------
>
>                 Key: BEAM-9951
>                 URL: https://issues.apache.org/jira/browse/BEAM-9951
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Daniel Oliveira
>            Assignee: Daniel Oliveira
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Create synthetic sources for the Go SDK like [Java|https://github.com/apache/beam/tree/master/sdks/java/io/synthetic/src/main/java/org/apache/beam/sdk/io/synthetic] and [Python|https://github.com/apache/beam/blob/master/sdks/python/apache_beam/testing/synthetic_pipeline.py] have.



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