}
private void finalizeMapping(int partitionId, DefaultContext<KeyOut, ValueOut> context)
throws Exception {
RequestPartitionResult result = mapReduceService
.processRequest(supervisor.getJobOwner(), new RequestPartitionReducing(name, jobId, partitionId), name);
if (result.getResultState() == SUCCESSFUL) {
// If we have a reducer defined just send it over
if (supervisor.getConfiguration().getReducerFactory() != null) {
Map<KeyOut, Chunk> chunkMap = context.finish();
if (chunkMap.size() > 0) {
sendLastChunkToAssignedReducers(partitionId, chunkMap);