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 the DefaultRollingPolicy. The build() method must be called to instantiate the policy.
  • 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 public DefaultRollingPolicy.PolicyBuilder withMaxPartSize(long size)
      Deprecated.
      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.
      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 the org.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 the org.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.
      Sets the max time a part file can stay open before having to roll. The frequency at which this is checked is controlled by the org.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 the org.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.