protected MapReduceTask<String, String, String, Integer> createMapReduceTask(Cache c) {
//run distributed reduce with per task cache - cache specified by the user
MapReduceTask<String, String, String, Integer> t = new MapReduceTask<String, String, String, Integer>(c, true,
false);
ConfigurationBuilder cacheConfig = new ConfigurationBuilder();
cacheConfig.unsafe().unreliableReturnValues(true)
.clustering().cacheMode(CacheMode.DIST_SYNC).hash().numOwners(2).sync();
//In the real world people will define configurations using xml files
defineConfigurationOnAllManagers(intermediateCacheNameConfig, cacheConfig);
return t.usingIntermediateCache(intermediateCacheNameConfig);