From 6fee530e092b861544dc3c2bffd189b4e68983ef Mon Sep 17 00:00:00 2001 From: Sam Rohde Date: Mon, 10 Feb 2020 15:27:19 -0800 Subject: [PATCH] Modify the TestStreamFileRecord to use TestStreamPayload events. Change-Id: I84ec1dd4698534c26c3a5219669da5f1a127250a --- .../src/main/proto/beam_interactive_api.proto | 12 ++---------- model/pipeline/src/main/proto/beam_runner_api.proto | 9 ++++++++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/model/interactive/src/main/proto/beam_interactive_api.proto b/model/interactive/src/main/proto/beam_interactive_api.proto index 91c89c88708c..e9136cb11ff0 100644 --- a/model/interactive/src/main/proto/beam_interactive_api.proto +++ b/model/interactive/src/main/proto/beam_interactive_api.proto @@ -46,14 +46,6 @@ message TestStreamFileHeader { // give enough information to create a faithful recreation of the original // stream of data. message TestStreamFileRecord { - oneof recorded_event { - // The recorded element with its event timestamp (when it was produced). - org.apache.beam.model.pipeline.v1.TestStreamPayload.TimestampedElement element = 1; - - // Indicating the output watermark of the source changed. - google.protobuf.Timestamp watermark = 2; - } - - // The wall-time timestamp of either the new element or watermark change. - google.protobuf.Timestamp processing_time = 3; + // The recorded event from an element stream. + org.apache.beam.model.pipeline.v1.TestStreamPayload.Event recorded_event = 1; } diff --git a/model/pipeline/src/main/proto/beam_runner_api.proto b/model/pipeline/src/main/proto/beam_runner_api.proto index 5439bc008c10..050fc070c925 100644 --- a/model/pipeline/src/main/proto/beam_runner_api.proto +++ b/model/pipeline/src/main/proto/beam_runner_api.proto @@ -576,7 +576,14 @@ service TestStreamService { // A TestStream will request for events using this RPC. rpc Events(EventsRequest) returns (stream TestStreamPayload.Event) {} } -message EventsRequest {} + +message EventsRequest { + // The set of PCollections to read from. These are the PTransform outputs + // local names. These are a subset of the TestStream's outputs. This allows + // Interactive Beam to cache many PCollections from a pipeline then replay a + // subset of them. + repeated string output_ids = 1; +} // The payload for the special-but-not-primitive WriteFiles transform. message WriteFilesPayload {