use of com.hazelcast.jet.JetCacheManager in project hazelcast-jet by hazelcast.
the class HazelcastConnectorTest method setup.
@Before
public void setup() {
JetConfig jetConfig = new JetConfig();
Config hazelcastConfig = jetConfig.getHazelcastConfig();
hazelcastConfig.addCacheConfig(new CacheSimpleConfig().setName("*"));
hazelcastConfig.addEventJournalConfig(new EventJournalConfig().setCacheName("stream*").setMapName("stream*"));
jetInstance = createJetMember(jetConfig);
JetInstance jetInstance2 = createJetMember(jetConfig);
sourceName = randomString();
sinkName = randomString();
streamSourceName = "stream" + sourceName;
streamSinkName = "stream" + sinkName;
// workaround for `cache is not created` exception, create cache locally on all nodes
JetCacheManager cacheManager = jetInstance2.getCacheManager();
cacheManager.getCache(sourceName);
cacheManager.getCache(sinkName);
cacheManager.getCache(streamSourceName);
cacheManager.getCache(streamSinkName);
}
Aggregations