Class DefaultRollingPolicy.PolicyBuilder
- java.lang.Object
-
- org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.DefaultRollingPolicy.PolicyBuilder
-
- Enclosing class:
- DefaultRollingPolicy<IN,BucketID>
@PublicEvolving public static final class DefaultRollingPolicy.PolicyBuilder extends Object
A helper class that holds the configuration properties for theDefaultRollingPolicy. Thebuild()method must be called to instantiate the policy.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <IN,BucketID>
DefaultRollingPolicy<IN,BucketID>build()Creates the actual policy.DefaultRollingPolicy.PolicyBuilderwithInactivityInterval(long interval)Deprecated.UsewithInactivityInterval(Duration)instead.DefaultRollingPolicy.PolicyBuilderwithInactivityInterval(Duration interval)Sets the interval of allowed inactivity after which a part file will have to roll.DefaultRollingPolicy.PolicyBuilderwithMaxPartSize(long size)Deprecated.UsewithMaxPartSize(MemorySize)instead.DefaultRollingPolicy.PolicyBuilderwithMaxPartSize(org.apache.flink.configuration.MemorySize size)Sets the part size above which a part file will have to roll.DefaultRollingPolicy.PolicyBuilderwithRolloverInterval(long interval)Deprecated.UsewithRolloverInterval(Duration)instead.DefaultRollingPolicy.PolicyBuilderwithRolloverInterval(Duration interval)Sets the max time a part file can stay open before having to roll.
-
-
-
Method Detail
-
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 public DefaultRollingPolicy.PolicyBuilder withMaxPartSize(long size)
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 public DefaultRollingPolicy.PolicyBuilder withInactivityInterval(long interval)
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
public DefaultRollingPolicy.PolicyBuilder withInactivityInterval(Duration interval)
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 public DefaultRollingPolicy.PolicyBuilder withRolloverInterval(long interval)
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
public DefaultRollingPolicy.PolicyBuilder withRolloverInterval(Duration interval)
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
public <IN,BucketID> DefaultRollingPolicy<IN,BucketID> build()
Creates the actual policy.
-
-