0

We are using hazelcast in our project, i would like to know that whatever calculation we do runs on the hazelcast node or the client itself

For eg.

Imap map = client.get("data");
map.values().stream....

In this example does it get whole map from hzc (hazelcast) or its just a reference and when i actually use terminal function in the stream it goes to hzc node and performs operation and get the data?

Abhishek
  • 519
  • 1
  • 6
  • 24

1 Answers1

0

map.values() will fetch all the values from all the nodes to the client. Please review Fast Aggregations if you need to do the calculations on member side.

Ozan Kılıç
  • 571
  • 2
  • 8
  • Thank you so much, ideally we will be able to do all operation that we could do using stream in fast aggregation? – Abhishek Jan 15 '19 at 11:15
  • You are welcome! Yes, you can use lambdas in your aggregator implementations. – Ozan Kılıç Jan 15 '19 at 13:57
  • Could we use hzc jet and that will also run on members ? if yes what about performance which one is better jet or fast aggregator ? – Abhishek Jan 16 '19 at 08:30
  • Hazelcast Jet will also distribute the calculation among members. The performance depends on the use case. I would definitely suggest you give it a try for your use case. – Ozan Kılıç Jan 16 '19 at 09:02
  • To conclude the thread jet was really faster than fast agg when the dataset was huge. Thanks for the help – Abhishek Jan 21 '19 at 10:54
  • Also please consider accepting answers to your open questions that you are satisfied with - you have a lot of open ones and we try to track if there are any unanswered questions about Hazelcast & Jet – Can Gencer Jan 31 '19 at 15:44