rohdesamuel commented on code in PR #25354:
URL: https://github.com/apache/beam/pull/25354#discussion_r1113663848


##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/debug/OutputSampler.java:
##########
@@ -91,10 +94,13 @@ public void sample(T element) {
   /**
    * Clears samples at end of call. This is to help mitigate memory use.
    *
+   * <p>This method is invoked by a thread handling a data sampling request in 
parallel to any calls
+   * to {@link #sample}.
+   *
    * @return samples taken since last call.
    */
-  public List<byte[]> samples() {
-    List<byte[]> ret = new ArrayList<>();
+  public List<BeamFnApi.SampledElement> samples() throws IOException {
+    List<BeamFnApi.SampledElement> ret = new ArrayList<>();
 
     // Serializing can take a lot of CPU time for larger or complex elements. 
Copy the array here
     // so as to not slow down the main processing hot path.

Review Comment:
   Done! 



-- 
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]

Reply via email to