lukecwik commented on code in PR #25065:
URL: https://github.com/apache/beam/pull/25065#discussion_r1080668824
##########
model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto:
##########
@@ -137,12 +138,64 @@ message InstructionResponse {
FinalizeBundleResponse finalize_bundle = 1004;
MonitoringInfosMetadataResponse monitoring_infos = 1005;
HarnessMonitoringInfosResponse harness_monitoring_infos = 1006;
+ SampleResponse sample = 1007;
// DEPRECATED
RegisterResponse register = 1000;
}
}
+// If supported, the `SampleRequest` will respond with a `SampleResponse` of
any
+// sampled elements for the PCollections within the given
+// ProcessBundleDescriptor. The SDK being queried must have the
+// "beam:protocol:data_sampling:v1" capability.
+message SampleRequest {
+ // Required. The id of the ProcessBundleDescriptor to sample. If empty,
+ // returns samples from all descriptors.
+ string process_bundle_descriptor_id = 1;
+
+ // Optional. The PCollections to sample from. If empty, returns all sampled
+ // PCollections from the given PBD. If both are empty, returns all samples.
+ repeated string pcollection_ids = 2;
+}
+
+// Contains sampled elements from all PCollections from a single
+// ProcessBundleDescriptor when the SDK is processing a bundle.
+message Samples {
+
+ // A sampled element. This is a proto message to allow for additional
+ // per-element metadata.
+ message Element {
+ // Required. Sampled raw bytes for an element. This is a
+ // single encoded element in the nested context.
+ bytes element = 1;
Review Comment:
I think it would make sense to have different lists for arbitrary samples,
slow elements and elements that errored out instead of creating one giant
element that has all the permutations.
This way we can create a different element list like:
SlowElement
ErorredElement
and down in ElementList these as we get new use cases. You could have them
commented out for now so that when someone works to expand this feature they
will have our thought already laid out on what we expect from the data
structure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]