From 0c7676b46c7010b0a4e43913d91b13229375721f Mon Sep 17 00:00:00 2001 From: lostluck <13907733+lostluck@users.noreply.github.com> Date: Sat, 18 Feb 2023 09:32:52 -0800 Subject: [PATCH] [prism] B method comments. --- .../pkg/beam/runners/prism/internal/worker/bundle.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sdks/go/pkg/beam/runners/prism/internal/worker/bundle.go b/sdks/go/pkg/beam/runners/prism/internal/worker/bundle.go index 4264473f1dc5..f6fbf1293f47 100644 --- a/sdks/go/pkg/beam/runners/prism/internal/worker/bundle.go +++ b/sdks/go/pkg/beam/runners/prism/internal/worker/bundle.go @@ -55,7 +55,8 @@ type B struct { // TODO: Metrics for this bundle, can be handled after the fact. } -// Init initializes the +// Init initializes the bundle's internal state for waiting on all +// data and for relaying a response back. func (b *B) Init() { // We need to see final data signals that match the number of // outputs the stage this bundle executes posesses @@ -69,10 +70,11 @@ func (b *B) LogValue() slog.Value { slog.String("stage", b.PBDID)) } -// ProcessOn executes the given bundle on the given worker. +// ProcessOn executes the given bundle on the given W, blocking +// until all data is complete. // -// Assumes the bundle is initialized (all maps are non-nil, and data waitgroup is set.) -// Assumes the bundle descriptor is already registered. +// Assumes the bundle is initialized (all maps are non-nil, and data waitgroup is set, response channel initialized) +// Assumes the bundle descriptor is already registered with the W. // // While this method mostly manipulates a W, putting it on a B avoids mixing the workers // public GRPC APIs up with local calls.