[
https://issues.apache.org/jira/browse/BEAM-4031?focusedWorklogId=98052&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-98052
]
ASF GitHub Bot logged work on BEAM-4031:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/May/18 21:57
Start Date: 03/May/18 21:57
Worklog Time Spent: 10m
Work Description: tgroh closed pull request #5272: [BEAM-4031] Add labels
flag to Go SDK Dataflow Runner.
URL: https://github.com/apache/beam/pull/5272
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/sdks/go/pkg/beam/runners/dataflow/dataflow.go
b/sdks/go/pkg/beam/runners/dataflow/dataflow.go
index 093628769f3..38d04fee143 100644
--- a/sdks/go/pkg/beam/runners/dataflow/dataflow.go
+++ b/sdks/go/pkg/beam/runners/dataflow/dataflow.go
@@ -52,6 +52,7 @@ var (
endpoint = flag.String("dataflow_endpoint", "", "Dataflow
endpoint (optional).")
stagingLocation = flag.String("staging_location", "", "GCS staging
location (required).")
image = flag.String("worker_harness_container_image", "",
"Worker harness container image (required).")
+ labels = flag.String("labels", "", "JSON-formatted
map[string]string of job labels (optional).")
numWorkers = flag.Int64("num_workers", 0, "Number of workers
(optional).")
zone = flag.String("zone", "", "GCP zone (optional)")
region = flag.String("region", "us-central1", "GCP Region
(optional)")
@@ -93,6 +94,12 @@ func Execute(ctx context.Context, p *beam.Pipeline) error {
if *image == "" {
*image = jobopts.GetContainerImage(ctx)
}
+ var jobLabels map[string]string
+ if *labels != "" {
+ if err := json.Unmarshal([]byte(*labels), &jobLabels); err !=
nil {
+ return fmt.Errorf("Error reading --label flag as JSON:
%v", err)
+ }
+ }
jobName := jobopts.GetJobName()
edges, _, err := p.Build()
@@ -201,6 +208,7 @@ func Execute(ctx context.Context, p *beam.Pipeline) error {
TempStoragePrefix: *stagingLocation + "/tmp",
Experiments: append(jobopts.GetExperiments(),
"beam_fn_api"),
},
+ Labels: jobLabels,
Steps: steps,
}
----------------------------------------------------------------
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: 98052)
Time Spent: 2h (was: 1h 50m)
> Add missing dataflow customization options for Go SDK
> -----------------------------------------------------
>
> Key: BEAM-4031
> URL: https://issues.apache.org/jira/browse/BEAM-4031
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Henning Rohde
> Assignee: Jason Kuster
> Priority: Minor
> Fix For: 2.5.0
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> We're missing at least:
> zone
> temp_location
> worker_machine_type
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)