Class CLI
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.mapreduce.tools.CLI
- All Implemented Interfaces:
Configurable,Tool
- Direct Known Subclasses:
JobClient
Interprets the map reduce cli options
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayJobList(JobStatus[] jobs) voiddisplayJobList(JobStatus[] jobs, PrintWriter writer) protected voiddisplayTasks(Job job, String type, String state) Display the information about a job's tasks, of a particular type and in a particular stateprotected longgetCounter(Counters counters, String counterGroupName, String counterName) protected static StringgetTaskLogURL(TaskAttemptID taskId, String baseUrl) static voidintExecute the command with the given arguments.Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
cluster
-
headerPattern
-
dataPattern
-
-
Constructor Details
-
CLI
public CLI() -
CLI
-
-
Method Details
-
run
Description copied from interface:ToolExecute the command with the given arguments. -
getCounter
protected long getCounter(Counters counters, String counterGroupName, String counterName) throws IOException - Throws:
IOException
-
getTaskLogURL
-
displayTasks
protected void displayTasks(Job job, String type, String state) throws IOException, InterruptedException Display the information about a job's tasks, of a particular type and in a particular state- Parameters:
job- the jobtype- the type of the task (map/reduce/setup/cleanup)state- the state of the task (pending/running/completed/failed/killed)- Throws:
IOException- when there is an error communicating with the masterInterruptedExceptionIllegalArgumentException- if an invalid type/state is passed
-
displayJobList
- Throws:
IOExceptionInterruptedException
-
displayJobList
-
main
- Throws:
Exception
-