private ReduceCommand<KOut, VOut> buildReduceCommand(String taskId,
String destinationCache, Reducer<KOut, VOut> r, Collection<KOut> keys, boolean emitCompositeIntermediateKeys){
ComponentRegistry registry = cache.getComponentRegistry();
CommandsFactory factory = registry.getComponent(CommandsFactory.class);
ReduceCommand<KOut,VOut> reduceCommand = factory.buildReduceCommand(taskId, destinationCache, r, keys);
reduceCommand.setEmitCompositeIntermediateKeys(emitCompositeIntermediateKeys);
return reduceCommand;
}
private Map<KOut, List<VOut>> invokeMapCombineLocallyForLocalReduction(MapCombineCommand<KIn, VIn, KOut, VOut> mcc) {