|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.util.ToolRunner
public class ToolRunner
A utility to help run Tools.
ToolRunner can be used to run classes implementing
Tool interface. It works in conjunction with
GenericOptionsParser to parse the
generic hadoop command line arguments and modifies the
Configuration of the Tool. The
application-specific options are passed along without being modified.
Tool,
GenericOptionsParser| Constructor Summary | |
|---|---|
ToolRunner()
|
|
| Method Summary | |
|---|---|
static void |
printGenericCommandUsage(PrintStream out)
Prints generic command-line argurments and usage information. |
static int |
run(Configuration conf,
Tool tool,
String[] args)
Runs the given Tool by Tool.run(String[]), after
parsing with the given generic arguments. |
static int |
run(Tool tool,
String[] args)
Runs the Tool with its Configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ToolRunner()
| Method Detail |
|---|
public static int run(Configuration conf,
Tool tool,
String[] args)
throws Exception
Tool by Tool.run(String[]), after
parsing with the given generic arguments. Uses the given
Configuration, or builds one if null.
Sets the Tool's configuration with the possibly modified
version of the conf.
conf - Configuration for the Tool.tool - Tool to run.args - command-line arguments to the tool.
Tool.run(String[]) method.
Exception
public static int run(Tool tool,
String[] args)
throws Exception
Tool with its Configuration.
Equivalent to run(tool.getConf(), tool, args).
tool - Tool to run.args - command-line arguments to the tool.
Tool.run(String[]) method.
Exceptionpublic static void printGenericCommandUsage(PrintStream out)
out - stream to write usage information to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||