You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/08 02:21:40 UTC

[GitHub] [flink] HuangXingBo commented on a diff in pull request #19896: [FLINK-27932][python] align noWatermarks and withWatermarkAlignment API

HuangXingBo commented on code in PR #19896:
URL: https://github.com/apache/flink/pull/19896#discussion_r891853808


##########
flink-python/pyflink/common/watermark_strategy.py:
##########
@@ -57,12 +59,56 @@ def with_idleness(self, idle_timeout: Duration) -> 'WatermarkStrategy':
         Creates a new enriched WatermarkStrategy that also does idleness detection in the created
         WatermarkGenerator.
 
+        Example:
+        ::
+
+            >>> WatermarkStrategy \\
+            ...     .for_bounded_out_of_orderness(Duration.of_seconds(20)) \\
+            ...     .with_idleness(Duration.of_minutes(1))
+
         :param idle_timeout: The idle timeout.
         :return: A new WatermarkStrategy with idle detection configured.
         """
-        self._j_watermark_strategy = self._j_watermark_strategy\
-            .withIdleness(idle_timeout._j_duration)
-        return self
+        return WatermarkStrategy(self._j_watermark_strategy.withIdleness(idle_timeout._j_duration))
+
+    def with_watermark_alignment(self, watermark_group: str, max_allowed_watermark_drift: Duration,
+                                 update_interval: Optional[Duration] = None):

Review Comment:
   ```suggestion
                                    update_interval: Optional[Duration] = None) -> 'WatermarkStrategy':
   ```



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org