use of com.hazelcast.config.EventJournalConfig in project hazelcast-jet by hazelcast.
the class StreamEventJournalPTest method setUp.
@Before
public void setUp() {
JetConfig config = new JetConfig();
EventJournalConfig journalConfig = new EventJournalConfig().setMapName("*").setCapacity(JOURNAL_CAPACITY).setEnabled(true);
config.getHazelcastConfig().setProperty(PARTITION_COUNT.getName(), String.valueOf(NUM_PARTITIONS));
config.getHazelcastConfig().addEventJournalConfig(journalConfig);
instance = this.createJetMember(config);
map = (MapProxyImpl<String, Integer>) instance.getHazelcastInstance().<String, Integer>getMap("test");
List<Integer> allPartitions = IntStream.range(0, NUM_PARTITIONS).boxed().collect(toList());
supplier = () -> new StreamEventJournalP<>(map, allPartitions, e -> true, EventJournalMapEvent::getNewValue, START_FROM_OLDEST, false, wmGenParams(Integer::intValue, limitingLag(0), suppressAll(), -1));
key0 = generateKeyForPartition(instance.getHazelcastInstance(), 0);
key1 = generateKeyForPartition(instance.getHazelcastInstance(), 1);
}
use of com.hazelcast.config.EventJournalConfig in project hazelcast-jet by hazelcast.
the class StreamEventJournalP_WmCoalescingTest method setUp.
@Before
public void setUp() {
JetConfig config = new JetConfig();
EventJournalConfig journalConfig = new EventJournalConfig().setMapName("*").setCapacity(JOURNAL_CAPACITY).setEnabled(true);
config.getHazelcastConfig().setProperty(PARTITION_COUNT.getName(), "2");
config.getHazelcastConfig().addEventJournalConfig(journalConfig);
JetInstance instance = this.createJetMember(config);
assert map == null;
map = (MapProxyImpl<Integer, Integer>) instance.getHazelcastInstance().<Integer, Integer>getMap("test");
partitionKeys = new int[2];
for (int i = 1; IntStream.of(partitionKeys).anyMatch(val -> val == 0); i++) {
int partitionId = instance.getHazelcastInstance().getPartitionService().getPartition(i).getPartitionId();
partitionKeys[partitionId] = i;
}
}
Aggregations