boyuanzz commented on a change in pull request #12016:
URL: https://github.com/apache/beam/pull/12016#discussion_r454077833



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/RestrictionTracker.java
##########
@@ -99,6 +99,24 @@
    */
   public abstract void checkDone() throws IllegalStateException;
 
+  public enum RestrictionBoundness {
+    IS_BOUNDED,
+    IS_UNBOUNDED
+  }
+
+  /**
+   * Return the boundedness of current tracking restriction. If the current 
restriction produces
+   * finite output, it should return {@link RestrictionBoundness#IS_BOUNDED}. 
Otherwise, it should
+   * return {@link RestrictionBoundness#IS_UNBOUNDED}.
+   *
+   * <p>The API is called by the system when the pipeline starts to drain and 
there is no
+   * implementation of {@link DoFn.TruncateRestriction}. Based on the 
boundness of the restriction,
+   * the system will give the default behavior of truncating restrictions.
+   *
+   * <p>The API is required to be implemented.
+   */

Review comment:
       Created JIRA https://issues.apache.org/jira/browse/BEAM-10480 for 
tracking this cleanup.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to