y1chi commented on a change in pull request #16769:
URL: https://github.com/apache/beam/pull/16769#discussion_r801206678



##########
File path: 
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/data/BeamFnDataOutboundAggregator.java
##########
@@ -85,10 +87,17 @@ public BeamFnDataOutboundAggregator(
     this.processBundleRequestIdSupplier = processBundleRequestIdSupplier;
     this.bytesWrittenSinceFlush = 0L;
     this.flushLock = new Object();
+    this.hasFlushedForBundle = false;
   }
 
-  /** Starts the flushing daemon thread if data_buffer_time_limit_ms is set. */
-  public void startFlushThread() {
+  /**
+   * Starts the flushing daemon thread if data_buffer_time_limit_ms is set. If
+   * collectElementsIfNoFlushes is true, {@link
+   * #sendOrCollectBufferedDataAndFinishOutboundStreams()} returns the 
buffered data instead of
+   * sending it to the outboundObserver if no flushes have taken place within 
this bundle
+   */
+  public void start(boolean collectElementsIfNoFlushes) {
+    this.collectElementsIfNoFlushes = collectElementsIfNoFlushes;

Review comment:
       Sounds good to replay, I've updated accordingly.




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