I am using this code snippet. But I am not sure this is the correct way. Is there any other methods or API to find the execution time of a MapReduce Job?

Date date; long start, end; // for recording starting and end time of job

date = new Date(); start = date.getTime(); // starting timer

job.waitForCompletion(true)

date = new Date(); endTime = date.getTime(); //end timer

log.info("Total Time (in milliseconds) = "+ (endTime-startTime));

log.info("Total Time (in seconds) = "+ (endTime-startTime)*0.001F);

More Sudhakar Singh's questions See All
Similar questions and discussions