Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get names of the currently running hadoop jobs?

Tags:

hadoop

I need to get the list of job names that currently running, but hadoop -job list give me a list of jobIDs.

  • Is there a way to get names of the running jobs?
  • Is there a way to get the job names from jobIDs?
like image 604
Karthik Avatar asked May 05 '11 03:05

Karthik


People also ask

How can you identify and troubleshoot a long running job in Hadoop?

You can monitor all the jobs that are running on a YARN cluster by tracking the job URL that you will get after submitting the job. You can monitor your Hive job status also using resource manager web UI. Visit localhost:8088, here you can see the list of all jobs that are submitted to the YARN cluster in that session.

How do I check my MapReduce status?

From the Dashboard's Common Tasks menu, select MapReduce Workload. The console opens in a new window. Click MapReduce > Workload > Jobs. At this level, you can view details of a job such as job status and map/reduce task summary.

What is the command to submit a MapReduce job to a Hadoop cluster?

waitForCompletion(true); job. submit();

How is job defined in Hadoop?

You schedule IBM Workload Scheduler Hadoop Map Reduce jobs by defining them in job streams. Add the job to a job stream with all the necessary scheduling arguments and submit the job stream. You can submit jobs by using the Dynamic Workload Console, Application Lab or the conman command line.


1 Answers

I've had to do this a number of times so I came up with the following command line that you can throw in a script somewhere and reuse. It prints the jobid followed by the job name.

hadoop job -list | egrep '^job' | awk '{print $1}' | xargs -n 1 -I {} sh -c "hadoop job -status {} | egrep '^tracking' | awk '{print \$3}'" | xargs -n 1 -I{} sh -c "echo -n {} | sed 's/.*jobid=//'; echo -n ' ';curl -s -XGET {} | grep 'Job Name' | sed 's/.* //' | sed 's/<br>//'"
like image 71
AnthonyF Avatar answered Oct 19 '22 09:10

AnthonyF