use of com.hazelcast.jet.pipeline.SlidingWindowDef in project hazelcast-jet by hazelcast.
the class WindowAggregateTransform_IntegrationTest method testWindowDefinition.
@Test
public void testWindowDefinition() {
Pipeline p = Pipeline.create();
SlidingWindowDef tumbling = WindowDefinition.tumbling(2);
StageWithWindow<Entry<Long, String>> stage = p.drawFrom(Sources.<Long, String>mapJournal("source", START_FROM_OLDEST)).window(tumbling);
assertEquals(tumbling, stage.windowDefinition());
}
use of com.hazelcast.jet.pipeline.SlidingWindowDef in project hazelcast-jet by hazelcast.
the class WindowGroupTransform_IntegrationTest method testWindowDefinition.
@Test
public void testWindowDefinition() {
Pipeline p = Pipeline.create();
SlidingWindowDef tumbling = WindowDefinition.tumbling(2);
StageWithGroupingAndWindow<Entry<Long, String>, Character> stage = p.drawFrom(Sources.<Long, String>mapJournal("source", START_FROM_OLDEST)).groupingKey(entry -> entry.getValue().charAt(0)).window(tumbling);
assertEquals(tumbling, stage.windowDefinition());
}
Aggregations