[
https://issues.apache.org/jira/browse/FLINK-9138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16464403#comment-16464403
]
ASF GitHub Bot commented on FLINK-9138:
---------------------------------------
Github user glaksh100 commented on a diff in the pull request:
https://github.com/apache/flink/pull/5860#discussion_r186223099
--- Diff:
flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java
---
@@ -908,6 +929,20 @@ private void
handlePendingFilesForPreviousCheckpoints(Map<Long, List<String>> pe
return this;
}
+ /**
+ * Sets the roll over interval in milliseconds.
+ *
+ *
+ * <p>When a bucket part file is older than the roll over interval, a
new bucket part file is
+ * started and the old one is closed. The name of the bucket file
depends on the {@link Bucketer}.
+ *
+ * @param batchRolloverInterval The roll over interval in milliseconds
+ */
+ public BucketingSink<T> setBatchRolloverInterval(long
batchRolloverInterval) {
+ this.batchRolloverInterval = batchRolloverInterval;
+ return this;
--- End diff --
Added a check for `batchRolloverInterval` to be a positive non-zero value.
> Enhance BucketingSink to also flush data by time interval
> ---------------------------------------------------------
>
> Key: FLINK-9138
> URL: https://issues.apache.org/jira/browse/FLINK-9138
> Project: Flink
> Issue Type: Improvement
> Components: filesystem-connector
> Affects Versions: 1.4.2
> Reporter: Narayanan Arunachalam
> Priority: Major
>
> BucketingSink now supports flushing data to the file system by size limit and
> by period of inactivity. It will be useful to also flush data by a specified
> time period. This way, the data will be written out when write throughput is
> low but there is no significant time period gaps between the writes. This
> reduces ETA for the data in the file system and should help move the
> checkpoints faster as well.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)