use of com.hazelcast.core.IList in project hazelcast-jet by hazelcast.
the class WatermarkMaxRetention_IntegrationTest method doTest.
private void doTest(DAG dag) {
IList list = instance.getList(SINK_NAME);
instance.newJob(dag, new JobConfig().setMaxWatermarkRetainMillis(3000));
assertTrueAllTheTime(() -> assertEquals(list.toString(), 0, list.size()), 1);
assertTrueEventually(() -> {
assertEquals(1, list.size());
assertEquals("wm(1)", list.get(0));
}, 4);
}
use of com.hazelcast.core.IList in project hazelcast-jet by hazelcast.
the class LimitTest method intermediateOperation_sourceCache.
@Test
public void intermediateOperation_sourceCache() {
int limit = 10;
IList list = streamCache().map(Entry::getValue).limit(limit).collect(DistributedCollectors.toIList(randomString()));
assertEquals(limit, list.size());
}
use of com.hazelcast.core.IList in project hazelcast-jet by hazelcast.
the class LimitTest method sourceCache.
@Test
public void sourceCache() {
int limit = 10;
IList list = streamCache().limit(limit).collect(DistributedCollectors.toIList(randomString()));
assertEquals(limit, list.size());
}
use of com.hazelcast.core.IList in project hazelcast-jet by hazelcast.
the class ReadHdfsPTest method testReadHdfs.
@Test
public void testReadHdfs() {
DAG dag = new DAG();
Vertex source = dag.newVertex("source", readHdfsP(jobConf, mapperType.mapper)).localParallelism(4);
Vertex sink = dag.newVertex("sink", writeListP("sink")).localParallelism(1);
dag.edge(between(source, sink));
Future<Void> future = instance.newJob(dag).getFuture();
assertCompletesEventually(future);
IList list = instance.getList("sink");
assertEquals(expectedSinkSize(), list.size());
assertTrue(list.get(0).toString().contains("value"));
}
use of com.hazelcast.core.IList in project hazelcast-jet by hazelcast.
the class SkipTest method sourceCache.
@Test
public void sourceCache() {
int skip = 10;
IList list = streamCache().skip(skip).collect(DistributedCollectors.toIList(randomString()));
assertEquals(COUNT - skip, list.size());
}
Aggregations