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:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
Direct Known Subclasses:
JobClient

@InterfaceAudience.Public
@InterfaceStability.Stable
public class CLI
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

Interprets the map reduce cli options


Constructor Summary
CLI()
           
CLI(org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
protected  void displayJobList(Job[] 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)
           
 
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
 

Constructor Detail

CLI

public CLI()

CLI

public CLI(org.apache.hadoop.conf.Configuration conf)
Method Detail

run

public int run(String[] argv)
        throws Exception
Specified by:
run in interface org.apache.hadoop.util.Tool
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

protected void displayJobList(Job[] jobs)
                       throws IOException,
                              InterruptedException
Throws:
IOException
InterruptedException

main

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


Copyright © 2009 The Apache Software Foundation