You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by bo...@apache.org on 2020/03/20 18:37:16 UTC
[beam] branch master updated: Add Timer to Elements proto
representation.
This is an automated email from the ASF dual-hosted git repository.
boyuanz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new dde6dc3 Add Timer to Elements proto representation.
new c728d25 Merge pull request #11177 from boyuanzz/timer_proto
dde6dc3 is described below
commit dde6dc3976700ed2d05bc05020dc7c61075c72d7
Author: Boyuan Zhang <bo...@google.com>
AuthorDate: Thu Mar 19 18:02:41 2020 -0700
Add Timer to Elements proto representation.
---
.../fn-execution/src/main/proto/beam_fn_api.proto | 34 +++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/model/fn-execution/src/main/proto/beam_fn_api.proto b/model/fn-execution/src/main/proto/beam_fn_api.proto
index 4bf1a39..eba21c5 100644
--- a/model/fn-execution/src/main/proto/beam_fn_api.proto
+++ b/model/fn-execution/src/main/proto/beam_fn_api.proto
@@ -164,6 +164,11 @@ message ProcessBundleDescriptor {
// data plane or if any of the transforms rely on user state or side inputs.
org.apache.beam.model.pipeline.v1.ApiServiceDescriptor
state_api_service_descriptor = 7;
+
+ // A descriptor describing the end point to use for Data API for user timers.
+ // Required if the ProcessBundleDescriptor contains any transforms that have user timers.
+ org.apache.beam.model.pipeline.v1.ApiServiceDescriptor
+ timer_api_service_descriptor = 8;
}
// One of the applications specifying the scope of work for a bundle.
@@ -533,8 +538,35 @@ message Elements {
bytes data = 3;
}
- // (Required) A list containing parts of logical byte streams.
+ // Represent the encoded user timer for a given instruction, transform and
+ // timer id.
+ message Timer {
+ // (Required) A reference to an active instruction request with the given
+ // instruction id.
+ string instruction_id = 1;
+
+ // (Required) A definition representing a consumer or producer of this data.
+ // If received by a harness, this represents the consumer within that
+ // harness that should consume these timers. If sent by a harness, this
+ // represents the producer of these timers.
+ string transform_id = 2;
+
+ // (Optional) The local timer name used to identify the associated timer specification.
+ string timer_id = 3;
+
+ // (Optional) Represents a logical byte stream of a timer. Encoded according
+ // to the coder in the timer spec.
+ // An empty data block represents the end of stream for the given
+ // instruction and transform.
+ bytes timer = 4;
+ }
+
+
+ // (Optional) A list containing parts of logical byte streams.
repeated Data data = 1;
+
+ // (Optional) A list of timer byte streams.
+ repeated Timer timer = 2;
}
// Stable