Search in sources :

Example 1 with DefaultRollingPolicy

use of org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.DefaultRollingPolicy in project flink by apache.

the class BucketsRollingPolicyTest method testDefaultRollingPolicyDeprecatedCreate.

@Test
public void testDefaultRollingPolicyDeprecatedCreate() throws Exception {
    DefaultRollingPolicy policy = DefaultRollingPolicy.builder().withInactivityInterval(Duration.ofMillis(10)).withMaxPartSize(new MemorySize(20)).withRolloverInterval(Duration.ofMillis(30)).build();
    Assert.assertEquals(10, policy.getInactivityInterval());
    Assert.assertEquals(20, policy.getMaxPartSize());
    Assert.assertEquals(30, policy.getRolloverInterval());
}
Also used : MemorySize(org.apache.flink.configuration.MemorySize) DefaultRollingPolicy(org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.DefaultRollingPolicy) Test(org.junit.Test)

Aggregations

MemorySize (org.apache.flink.configuration.MemorySize)1 DefaultRollingPolicy (org.apache.flink.streaming.api.functions.sink.filesystem.rollingpolicies.DefaultRollingPolicy)1 Test (org.junit.Test)1