hadoop cleanup method -метод
Primary tabs
Forums:
protected void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
Called once at the end of the task.вызывается в конце выполнения задания -
-имеется как в как в распределителе (мэппере) так и в сумматоре (редьюсэре)
Его вполне можно переопределить - дабы задать какие-то свои действия при выходе из задания:
@Override
protected void cleanup(Context context) throws InterruptedException {
try{
context.write(max_occured_key, new IntWritable(max_sum + 1));
} catch(IOException e){
e.printStackTrace();
}
}- Log in to post comments
- 2897 reads