Anda di halaman 1dari 2

1.

List all the running jobs using the following command:


hadoop job -list

We will be able to get an output similar to the following:

hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$ hadoop job -list


Warning: $HADOOP_HOME is deprecated.

0 jobs currently running


JobId State StartTime UserName Priority SchedulingInfo
hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$

___________________________________________________________
List all the submitted jobs since the start of the cluster with the following
command:
hadoop job -list all
hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$ hadoop job -list all
Warning: $HADOOP_HOME is deprecated.

0 jobs submitted
States are:
Running : 1 Succeded : 2 Failed : 3 Prep : 4
JobId State StartTime UserName Priority SchedulingInfo
hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$

________________________________________________________________

We can check the status of the default queue with the following command: hadoop
queue -list

hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$ hadoop queue -list


Warning: $HADOOP_HOME is deprecated.

Queue Name : default


Queue State : running
Scheduling Info : N/A
_______________________________________________________________
Check the status of a queue ACL with the following command: hadoop queue -showacls
hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$ hadoop queue -showacls
Warning: $HADOOP_HOME is deprecated.

Queue acls for user : hduser

Queue Operations
=====================
default submit-job,administer-jobs
hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$
_______________________________________________________________
Show all the jobs in the default queue using the following command:
hadoop queue -info default -showJobs

hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$ hadoop queue -info default


-showJobs
Warning: $HADOOP_HOME is deprecated.

Queue Name : default


Queue State : running
Scheduling Info : N/A
Job List
JobId State StartTime UserName Priority SchedulingInfo
hduser@nn1:/usr/local/hdpmetaxxcache/hadoop/bin$
_______________________________________________________________
Check the status of a job with the following command:
hadoop job -status job_201302152353_0001
_______________________________________________________________
Change the status of a job by performing the following steps:
1. Set the job job_201302152353_0001 to be on high priority using the following
command:

hadoop job -set-priority job_201302152353_0003 HIGH

Available priorities, in descending order, include: VERY_HIGH, HIGH, NORMAL, LOW,


and VERY_LOW.

The priority of the job will be HIGH as shown in the following output:

4 jobs submitted States are:


Running : 1 Succeeded : 2 Failed : 3 Prep : 4 JobId

State StartTime UserName Priority SchedulingInfo


job_201302152353_0001 2 1361405786524 hduser NORMAL NA
job_201302152353_0002 2 1361405860611 hduser NORMAL NA
job_201302152353_0003 1 1361408177470 hduser HIGH NA

2. Kill the job job_201302152353_0004 using the following command:


hadoop job -kill job_201302152353_0004

With the job status command, we will get the following output:

3 jobs submitted States are: Running : 1 Succeeded : 2 Failed : 3 Prep : 4


Killed : 5 JobId

State StartTime UserName Priority SchedulingInfo


job_201302152353_0001 2 1361405786524 hduser NORMAL NA
job_201302152353_0002 2 1361405860611 hduser NORMAL NA
job_201302152353_0003 1 1361408177470 hduser HIGH NA
job_201302152353_0004 5 1361407740639 hduser NORMAL NA

The Killed : 5 information is not in the original output, I put it there according
to the state of the killed job job_201302152353_0004.

Anda mungkin juga menyukai