@LimitedPrivate({"HDFS","MapReduce"})
@Unstable
public class ProgramDriver
extends java.lang.Object
| Constructor | Description |
|---|---|
ProgramDriver() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addClass(java.lang.String name,
java.lang.Class<?> mainClass,
java.lang.String description) |
This is the method that adds the classed to the repository.
|
void |
driver(java.lang.String[] argv) |
API compatible with Hadoop 1.x.
|
int |
run(java.lang.String[] args) |
This is a driver for the example programs.
|
public void addClass(java.lang.String name,
java.lang.Class<?> mainClass,
java.lang.String description)
throws java.lang.Throwable
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 classjava.lang.NoSuchMethodException - when a particular method cannot be found.java.lang.SecurityException - security manager to indicate a security violation.java.lang.Throwablepublic int run(java.lang.String[] args)
throws java.lang.Throwable
args - The argument from the user. args[0] is the command to run.java.lang.NoSuchMethodException - when a particular method cannot be found.java.lang.SecurityException - security manager to indicate a security violation.java.lang.IllegalAccessException - for backward compatibility.java.lang.IllegalArgumentException - if the arg is invalid.java.lang.Throwable - Anything thrown by the example program's mainpublic void driver(java.lang.String[] argv)
throws java.lang.Throwable
argv - argv.java.lang.Throwable - Anything thrown
by the example program's mainCopyright © 2008–2025 Apache Software Foundation. All rights reserved.