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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]