You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2023/02/20 01:49:26 UTC

[beam] 02/02: [prism] executor interface

This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a commit to branch prism-handlers
in repository https://gitbox.apache.org/repos/asf/beam.git

commit c2ca697b6acfe79c021104acb121254c04c844dd
Author: Robert Burke <ro...@frantil.com>
AuthorDate: Sun Feb 19 07:22:48 2023 -0800

    [prism] executor interface
---
 sdks/go/pkg/beam/runners/prism/internal/execute.go | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/sdks/go/pkg/beam/runners/prism/internal/execute.go b/sdks/go/pkg/beam/runners/prism/internal/execute.go
index b685df63cf6..88a6fce2437 100644
--- a/sdks/go/pkg/beam/runners/prism/internal/execute.go
+++ b/sdks/go/pkg/beam/runners/prism/internal/execute.go
@@ -15,8 +15,24 @@
 
 package internal
 
+import (
+	"github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/mtime"
+	pipepb "github.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1"
+	"github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/worker"
+)
+
 // stage represents a fused subgraph.
 // temporary implementation to break up PRs.
 type stage struct {
 	transforms []string
 }
+
+type transformExecuter interface {
+	ExecuteUrns() []string
+	ExecuteWith(t *pipepb.PTransform) string
+	ExecuteTransform(tid string, t *pipepb.PTransform, comps *pipepb.Components, watermark mtime.Time, data [][]byte) *worker.B
+}
+
+type processor struct {
+	transformExecuters map[string]transformExecuter
+}