org.apache.hadoop.util
Class ProgramDriver

java.lang.Object
  extended by org.apache.hadoop.util.ProgramDriver

public class ProgramDriver
extends Object

A driver that is used to run programs added to it


Constructor Summary
ProgramDriver()
           
 
Method Summary
 void addClass(String name, Class mainClass, String description)
          This is the method that adds the classed to the repository
 void driver(String[] args)
          This is a driver for the example programs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramDriver

public ProgramDriver()
Method Detail

addClass

public void addClass(String name,
                     Class mainClass,
                     String description)
              throws Throwable
This is the method that adds the classed to the repository

Parameters:
name - The name of the string you want the class instance to be called with
mainClass - The class that you want to add to the repository
description - The description of the class
Throws:
NoSuchMethodException
SecurityException
Throwable

driver

public void driver(String[] args)
            throws Throwable
This is a driver for the example programs. It looks at the first command line argument and tries to find an example program with that name. If it is found, it calls the main method in that class with the rest of the command line arguments.

Parameters:
args - The argument from the user. args[0] is the command to run.
Throws:
NoSuchMethodException
SecurityException
IllegalAccessException
IllegalArgumentException
Throwable - Anything thrown by the example program's main


Copyright © 2008 The Apache Software Foundation