[
https://issues.apache.org/jira/browse/BEAM-6113?focusedWorklogId=169271&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-169271
]
ASF GitHub Bot logged work on BEAM-6113:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Nov/18 05:10
Start Date: 26/Nov/18 05:10
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #7120:
[BEAM-6113] Small changes to avoid user errors around beam.Init()
URL: https://github.com/apache/beam/pull/7120#discussion_r236122674
##########
File path: sdks/go/examples/minimal_wordcount/minimal_wordcount.go
##########
@@ -53,6 +53,9 @@ import (
var wordRE = regexp.MustCompile(`[a-zA-Z]+('[a-z])?`)
func main() {
+ // beam.Init() is an initialization hook that must be called on startup.
+ beam.Init()
Review comment:
Please run gofmt on the modified files, the indentation is off.
You should be able to configure your IDE to run gofmt on save for .go files.
Most Go plugins should be able to handle this too.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 169271)
Time Spent: 0.5h (was: 20m)
> Streamline beam.Init() requirement for Go pipelines.
> ----------------------------------------------------
>
> Key: BEAM-6113
> URL: https://issues.apache.org/jira/browse/BEAM-6113
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Daniel Oliveira
> Assignee: Daniel Oliveira
> Priority: Minor
> Labels: documentation, usability
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> When writing a Go pipeline it's necessary to call beam.Init() at the
> beginning of your code, but right now there is nearly no validation or
> checking around that. This makes it very easy for a new user of Beam Go to
> accidentally leave it out and not get a clear signal for why their pipeline
> isn't being executed as expected. This issue is for tracking progress towards
> streamlining this requirement to improve the user experience.
> In the short term this can be easily improved by improving documentation and
> examples to clearly communicate the necessity of beam.Init(), and also add
> log warnings to provide some signal if the user forgot to call it.
> In the long term, the best solution to this would be to try avoiding the
> problem all together (for example by removing the need for beam.Init(), or
> having it called implicitly without relying on users to call it), or to
> create a stronger failure state, for example by having pipelines without
> beam.Init() immediately break with a clear message notifying the user that it
> was not called.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)