[
https://issues.apache.org/jira/browse/BEAM-4813?focusedWorklogId=126732&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-126732
]
ASF GitHub Bot logged work on BEAM-4813:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Jul/18 16:50
Start Date: 24/Jul/18 16:50
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #5994:
[BEAM-4813] Refactor Go Dataflow runner and translation
URL: https://github.com/apache/beam/pull/5994#discussion_r203807524
##########
File path: sdks/go/pkg/beam/core/runtime/pipelinex/util.go
##########
@@ -0,0 +1,89 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package pipelinex
+
+import pb "github.com/apache/beam/sdks/go/pkg/beam/model/pipeline_v1"
+
+// Bounded returns true iff all PCollections are bounded.
+func Bounded(p *pb.Pipeline) bool {
+ for _, col := range p.GetComponents().GetPcollections() {
+ if col.IsBounded == pb.IsBounded_UNBOUNDED {
+ return false
+ }
+ }
+ return true
+}
+
+// ContainerImages returns the set of container images used
+// in the given pipeline.
+func ContainerImages(p *pb.Pipeline) []string {
+ var ret []string
+ for _, t := range p.GetComponents().GetEnvironments() {
+ ret = append(ret, t.Url)
+ }
+ return ret
+}
+
+// TopologicalSort returns a topologically sorted list of the given
+// ids, generally from the same scope/composite. Assumes acyclic graph.
Review comment:
Since the visitor does track seen ids, and not re-visit them, it seems like
it should be able to handle acyclic graphs?
I'm OK with this being an implementation detail though, and not part of the
function's contract.
----------------------------------------------------------------
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: 126732)
Time Spent: 1h 40m (was: 1.5h)
> Make Go Dataflow translation use protos directly
> ------------------------------------------------
>
> Key: BEAM-4813
> URL: https://issues.apache.org/jira/browse/BEAM-4813
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Henning Rohde
> Assignee: Henning Rohde
> Priority: Major
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> The Go SDK maintains 2 pipeline translations and keeps various tweaks in
> sync. It would be better to remove the Dataflow one and extract a more
> flexible (such as running as a separate proxy) translation from proto to
> v1beta3.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)