Reputation: 41
I'm having a few problems with jet and hazelcast, but my question is for logic purposes, I have a class which is going to bring all the data and when we start the client we got a queue and 2 maps, but the other map is not called yet, when I start hazelcast jet instance and process all the data when I use the Sink I put this:
rulesIntoTransaction.writeTo(Sinks.map(jet.getHazelcastInstance().getMap(RULESRESULT_MAP), Transaction::getTransactionId, Transaction::getRulesResult));
but it's wrong.... I understand when you invoke the instance that's like a getDataStructure for hazelcast, jet its inside hazelcast I thought I could Jet.GetHazelcastInstance().GetDataStrcuture because I need the 3 maps to be synchronized in a new cluster to be wan replicated...
What are the differences between both frameworks?
Why can I do hazelcast.GetDataStrcuture("wololo"); but I can't do jet.getHazelcastInstance.getDataStructure("wololo");?
because to be replicated I need the 3 maps in a different cluster, but I can't do it if 2 of those maps are on hazelcast and the other is on hazelcast jet
Any hint?
Upvotes: 0
Views: 151
Reputation: 15086
What are the differences between both frameworks?
Hazelcast is in-memory data grid. Hazelcast Jet is a streaming engine. Hazelcast Jet is built on top of Hazelcast, so when you run Hazelcast Jet, you also run Hazelcast, it is not possible to do so without it. You can call getHazelcastInstance on JetInstance
to retrieve the Hazelcast member instance.
Since version 5.0 these 2 products were merged and when you use Hazelcast you also have the Jet engine available via getJet().
Why i can do hazelcast.GetDataStrcuture("wololo"); but i cant do jet.getHazelcastInstance.getDataStructure("wololo");?
You can, these are equivalent, e.g.:
jet.getHazelcastInstance.getMap("wololo"):
jet.getMap("wololo");
will give you the same map.
I don't fully understand the problem with 3 maps. Do you want to write to a local map (or maps) and then do WAN replication? Or do you want to write to a map in another cluster (using Sinks#remoteMap
)?
Upvotes: 0