You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Answer Agrawal <yr...@gmail.com> on 2015/05/15 17:07:16 UTC

How to find execution time of a MapReduce job?

Hi,


Date date; long start, end; // for recording start and end time of job
date = new Date(); start = date.getTime(); // starting timer

job.waitForCompletion(true)

date = new Date(); end = date.getTime(); //end timer
log.info("Total Time (in milliseconds) = "+ (end-start));
log.info("Total Time (in seconds) = "+ (end-start)*0.001F);


I am not sure above is the correct way to find. Is there any other method
or API to find the execution time of a MapReduce job?

Thanks,

Re: How to find execution time of a MapReduce job?

Posted by Vikas Parashar <pa...@gmail.com>.
Hi,

You can get it from yarn api. You have to find out difference beteen
accpted and finish state of Job.

Sent from my really tiny device :)

On Friday, May 15, 2015, Answer Agrawal <yr...@gmail.com> wrote:

> Hi,
>
>
> Date date; long start, end; // for recording start and end time of job
> date = new Date(); start = date.getTime(); // starting timer
>
> job.waitForCompletion(true)
>
> date = new Date(); end = date.getTime(); //end timer
> log.info("Total Time (in milliseconds) = "+ (end-start));
> log.info("Total Time (in seconds) = "+ (end-start)*0.001F);
>
>
> I am not sure above is the correct way to find. Is there any other method
> or API to find the execution time of a MapReduce job?
>
> Thanks,
>

Re: How to find execution time of a MapReduce job?

Posted by Vikas Parashar <pa...@gmail.com>.
Hi,

You can get it from yarn api. You have to find out difference beteen
accpted and finish state of Job.

Sent from my really tiny device :)

On Friday, May 15, 2015, Answer Agrawal <yr...@gmail.com> wrote:

> Hi,
>
>
> Date date; long start, end; // for recording start and end time of job
> date = new Date(); start = date.getTime(); // starting timer
>
> job.waitForCompletion(true)
>
> date = new Date(); end = date.getTime(); //end timer
> log.info("Total Time (in milliseconds) = "+ (end-start));
> log.info("Total Time (in seconds) = "+ (end-start)*0.001F);
>
>
> I am not sure above is the correct way to find. Is there any other method
> or API to find the execution time of a MapReduce job?
>
> Thanks,
>

Re: How to find execution time of a MapReduce job?

Posted by Vikas Parashar <pa...@gmail.com>.
Hi,

You can get it from yarn api. You have to find out difference beteen
accpted and finish state of Job.

Sent from my really tiny device :)

On Friday, May 15, 2015, Answer Agrawal <yr...@gmail.com> wrote:

> Hi,
>
>
> Date date; long start, end; // for recording start and end time of job
> date = new Date(); start = date.getTime(); // starting timer
>
> job.waitForCompletion(true)
>
> date = new Date(); end = date.getTime(); //end timer
> log.info("Total Time (in milliseconds) = "+ (end-start));
> log.info("Total Time (in seconds) = "+ (end-start)*0.001F);
>
>
> I am not sure above is the correct way to find. Is there any other method
> or API to find the execution time of a MapReduce job?
>
> Thanks,
>

Re: How to find execution time of a MapReduce job?

Posted by Vikas Parashar <pa...@gmail.com>.
Hi,

You can get it from yarn api. You have to find out difference beteen
accpted and finish state of Job.

Sent from my really tiny device :)

On Friday, May 15, 2015, Answer Agrawal <yr...@gmail.com> wrote:

> Hi,
>
>
> Date date; long start, end; // for recording start and end time of job
> date = new Date(); start = date.getTime(); // starting timer
>
> job.waitForCompletion(true)
>
> date = new Date(); end = date.getTime(); //end timer
> log.info("Total Time (in milliseconds) = "+ (end-start));
> log.info("Total Time (in seconds) = "+ (end-start)*0.001F);
>
>
> I am not sure above is the correct way to find. Is there any other method
> or API to find the execution time of a MapReduce job?
>
> Thanks,
>