[
https://issues.apache.org/jira/browse/BEAM-4813?focusedWorklogId=128783&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-128783
]
ASF GitHub Bot logged work on BEAM-4813:
----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Jul/18 16:38
Start Date: 30/Jul/18 16:38
Worklog Time Spent: 10m
Work Description: herohde 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_r206240818
##########
File path: sdks/go/pkg/beam/core/runtime/graphx/dataflow.go
##########
@@ -0,0 +1,301 @@
+// 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 graphx
+
+import (
+ "fmt"
+
+ "github.com/apache/beam/sdks/go/pkg/beam/core/graph/coder"
+ "github.com/apache/beam/sdks/go/pkg/beam/core/runtime/graphx/v1"
+ "github.com/apache/beam/sdks/go/pkg/beam/core/typex"
+ "github.com/apache/beam/sdks/go/pkg/beam/core/util/protox"
+)
+
+// TODO(herohde) 7/17/2018: move CoderRef to dataflowlib once Dataflow
+// sends back pure coder protos in the process bundle descriptors.
+
+// CoderRef defines the (structured) Coder in serializable form. It is
+// an artifact of the CloudObject encoding.
+type CoderRef struct {
+ Type string `json:"@type,omitempty"`
+ Components []*CoderRef `json:"component_encodings,omitempty"`
+ IsWrapper bool `json:"is_wrapper,omitempty"`
+ IsPairLike bool `json:"is_pair_like,omitempty"`
+ IsStreamLike bool `json:"is_stream_like,omitempty"`
+}
+
+// Exported types are used for translation lookup.
+const (
+ windowedValueType = "kind:windowed_value"
+ bytesType = "kind:bytes"
+ varIntType = "kind:varint"
+ streamType = "kind:stream"
+ pairType = "kind:pair"
+ lengthPrefixType = "kind:length_prefix"
+
+ globalWindowType = "kind:global_window"
+ intervalWindowType = "kind:interval_window"
+
+ cogbklistType = "kind:cogbklist" // CoGBK representation. Not a coder.
+)
+
+// WrapIterable adds an iterable (stream) coder for Dataflow side input.
+func WrapIterable(c *CoderRef) *CoderRef {
+ return &CoderRef{Type: streamType, Components: []*CoderRef{c},
IsStreamLike: true}
+}
+
+// WrapWindowed adds an windowed coder for Dataflow collections.
Review comment:
Done
----------------------------------------------------------------
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: 128783)
Time Spent: 2h 20m (was: 2h 10m)
> 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: 2h 20m
> 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)