org.apache.hadoop.mapreduce.tools
Class CLI

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.mapreduce.tools.CLI
All Implemented Interfaces:
Configurable, Tool
Direct Known Subclasses:
JobClient

@InterfaceAudience.Public
@InterfaceStability.Stable
public class CLI
extends Configured
implements Tool

Interprets the map reduce cli options


Field Summary
protected  Cluster cluster
           
 
Constructor Summary
CLI()
           
CLI(Configuration conf)
           
 
Method Summary
 void displayJobList(JobStatus[] jobs)
           
protected  void displayTasks(Job job, String type, String state)
          Display the information about a job's tasks, of a particular type and in a particular state
protected  long getCounter(Counters counters, String counterGroupName, String counterName)
           
protected static String getTaskLogURL(TaskAttemptID taskId, String baseUrl)
           
static void main(String[] argv)
           
 int run(String[] argv)
          Execute the command with the given arguments.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

cluster

protected Cluster cluster
Constructor Detail

CLI

public CLI()

CLI

public CLI(Configuration conf)
Method Detail

run

public int run(String[] argv)
        throws Exception
Description copied from interface: Tool
Execute the command with the given arguments.

Specified by:
run in interface Tool
Parameters:
argv - command specific arguments.
Returns:
exit code.
Throws:
Exception

getCounter

protected long getCounter(Counters counters,
                          String counterGroupName,
                          String counterName)
                   throws IOException
Throws:
IOException

getTaskLogURL

protected static String getTaskLogURL(TaskAttemptID taskId,
                                      String baseUrl)

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 job
type - the type of the task (map/reduce/setup/cleanup)
state - the state of the task (pending/running/completed/failed/killed)
Throws:
IOException
InterruptedException

displayJobList

public void displayJobList(JobStatus[] jobs)
                    throws IOException,
                           InterruptedException
Throws:
IOException
InterruptedException

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception


Copyright © 2014 Apache Software Foundation. All Rights Reserved.