Class DefaultRollingPolicy.PolicyBuilder
java.lang.Object
org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.DefaultRollingPolicy.PolicyBuilder
- Enclosing class:
- DefaultRollingPolicy<IN,
BucketID>
A helper class that holds the configuration properties for the
DefaultRollingPolicy.
The build() method must be called to instantiate the policy.-
Method Summary
Modifier and TypeMethodDescription<IN,BucketID>
DefaultRollingPolicy<IN,BucketID> build()Creates the actual policy.withInactivityInterval(long interval) Deprecated.withInactivityInterval(Duration interval) Sets the interval of allowed inactivity after which a part file will have to roll.withMaxPartSize(long size) Deprecated.UsewithMaxPartSize(MemorySize)instead.withMaxPartSize(org.apache.flink.configuration.MemorySize size) Sets the part size above which a part file will have to roll.withRolloverInterval(long interval) Deprecated.UsewithRolloverInterval(Duration)instead.withRolloverInterval(Duration interval) Sets the max time a part file can stay open before having to roll.
-
Method Details
-
withMaxPartSize
public DefaultRollingPolicy.PolicyBuilder withMaxPartSize(org.apache.flink.configuration.MemorySize size) Sets the part size above which a part file will have to roll.- Parameters:
size- the allowed part size.
-
withMaxPartSize
Deprecated.UsewithMaxPartSize(MemorySize)instead.Sets the part size above which a part file will have to roll.- Parameters:
size- the allowed part size.
-
withInactivityInterval
Deprecated.UsewithInactivityInterval(Duration)instead.Sets the interval of allowed inactivity after which a part file will have to roll. The frequency at which this is checked is controlled by theorg.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)setting.- Parameters:
interval- the allowed inactivity interval.
-
withInactivityInterval
Sets the interval of allowed inactivity after which a part file will have to roll. The frequency at which this is checked is controlled by theorg.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)setting.- Parameters:
interval- the allowed inactivity interval.
-
withRolloverInterval
Deprecated.UsewithRolloverInterval(Duration)instead.Sets the max time a part file can stay open before having to roll. The frequency at which this is checked is controlled by theorg.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)setting.- Parameters:
interval- the desired rollover interval.
-
withRolloverInterval
Sets the max time a part file can stay open before having to roll. The frequency at which this is checked is controlled by theorg.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)setting.- Parameters:
interval- the desired rollover interval.
-
build
Creates the actual policy.
-
withInactivityInterval(Duration)instead.