Search code examples
javamapreducedistributedhazelcastexecutor

should I use distributed executors or mapreduce in hazelcast


I need to run some calculations on a distributed map. But I cannot decide which approach to take.

My calculations will result in a map data structure. where the results will be mapped to their keys. think of it as a word count example. where word is the key and occurrence count is the value.

I have looked into both solutions and as I understand, map reduce fits best in this scenario but i want to keep things simple. and i also cannot see why this is not possible with distributed executor.


Solution

  • Both options are possible. Before we had the generic mapreduce framework people build solutions like this using the ExecutorService implementation.

    At the moment, it'll change in the near future, the mr solution doesn't offer a way to write to an IMap directly, so all results are send to the caller first and he would have to store it then.