Package org.apache.hadoop.util
Class ProgramDriver
java.lang.Object
org.apache.hadoop.util.ProgramDriver
A driver that is used to run programs added to it
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ProgramDriver
public ProgramDriver()
-
-
Method Details
-
addClass
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 withmainClass- The class that you want to add to the repositorydescription- The description of the class- Throws:
NoSuchMethodException- when a particular method cannot be found.SecurityException- security manager to indicate a security violation.Throwable
-
run
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.- Returns:
- -1 on error, 0 on success
- Throws:
NoSuchMethodException- when a particular method cannot be found.SecurityException- security manager to indicate a security violation.IllegalAccessException- for backward compatibility.IllegalArgumentException- if the arg is invalid.Throwable- Anything thrown by the example program's main
-
driver
API compatible with Hadoop 1.x.- Parameters:
argv- argv.- Throws:
Throwable- Anything thrown by the example program's main
-