Run function after reducers
Is there a function in java that is executed once after the reducer function completes. What I want to do is try to refine the output from the reducers so I need to run some code after the reducers completes the algorithm is there a possible way to do this.
You can use a ChainReducer to add as many Mappers as you want after the Reducer in the same reducer task.
If you want to apply an other Reducer, you will need to start a new task with an identity mapper and the reducer task you want to execute.
As stated in the doc:
Using the ChainMapper and the ChainReducer classes is possible to compose Map/Reduce jobs that look like [MAP+ / REDUCE MAP*]. And immediate benefit of this pattern is a dramatic reduction in disk IO.