Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to find the running time for a program in MapReduce

avatar
Explorer

I have executed a program in Hadoop MapReduce and I Wait to study the performance of my program with different input sizes, and I need the running time taken for each input?

the results are in the attached file

Thank youmapreduce.txt

2 REPLIES 2

avatar
Super Guru

@Maryem Mary,

You can use the mapreduce command line tool to get the execution time for each job. Use the below command to get all the stats of a job

mapred job -status {job-id}

.

To get the execution time, use

mapred job -status {job_id} | grep "CPU time"

.

If you have YARN application Id ,then replace 'application_xxx' with 'job_xxx' to get the mapreduce job id.

.

If you have written the Mapreduce application, then you can have custom counters as well to print extra information. See the example in the link

https://acadgild.com/blog/counters-in-mapreduce.

.

Please "Accept" the answer if this helps.

avatar
Super Guru

@Maryem Mary,

Did this work for you? Please take a moment to login and "Accept" the answer if this helped. This will be really useful for other community users 🙂