Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/trigger_files/beam_PreCommit_Java.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run.",
"modification": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ type Config struct {
// MaxBundleSize caps the number of elements permitted in a bundle.
// 0 or less means this is ignored.
MaxBundleSize int
// Whether to use real-time clock as processing time
EnableRTC bool
}

// ElementManager handles elements, watermarks, and related errata to determine
Expand Down Expand Up @@ -2160,8 +2162,10 @@ func (em *ElementManager) ProcessingTimeNow() (ret mtime.Time) {
}

// "Test" mode -> advance to next processing time event if any, to allow execution.
if t, ok := em.processTimeEvents.Peek(); ok {
return t
if !em.config.EnableRTC {
if t, ok := em.processTimeEvents.Peek(); ok {
return t
}
}

// "Production" mode, always real time now.
Expand Down
15 changes: 14 additions & 1 deletion sdks/go/pkg/beam/runners/prism/internal/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,20 @@ func executePipeline(ctx context.Context, wks map[string]*worker.W, j *jobservic
topo := prepro.preProcessGraph(comps, j)
ts := comps.GetTransforms()

em := engine.NewElementManager(engine.Config{})
config := engine.Config{}
m := j.PipelineOptions().AsMap()
if experimentsSlice, ok := m["beam:option:experiments:v1"].([]interface{}); ok {
for _, exp := range experimentsSlice {
if expStr, ok := exp.(string); ok {
if expStr == "prism_enable_rtc" {
config.EnableRTC = true
break // Found it, no need to check the rest of the slice
}
}
}
}

em := engine.NewElementManager(config)

// TODO move this loop and code into the preprocessor instead.
stages := map[string]*stage{}
Expand Down
Loading