use of com.hazelcast.jet.pipeline.StageWithGroupingAndWindow 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