|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.util.ToolRunner
com.ebay.erl.mobius.core.MobiusJobRunner
public class MobiusJobRunner
Executes a MobiusJob
.
When executing a Mobius job, use this class to ensure that
Mobius submits the job properly. Using ToolRunner
to submit a MobiusJob
will fail.
Here is an example:
public class MyJob extends MobiusJob
{
public void run()
throws Exception
{
....
// your flow here
....
}
public static void main(String[] args)
throws Throwable
{
int exitCode = MobiusJobRunner.run(new MyJob(), args);
System.exit(exitCode);
}
}
This product is licensed under the Apache License, Version 2.0,
available at http://www.apache.org/licenses/LICENSE-2.0.
This product contains portions derived from Apache hadoop which is
licensed under the Apache License, Version 2.0, available at
http://hadoop.apache.org.
© 2007 – 2012 eBay Inc., Evan Chiu, Woody Zhou, Neel Sundaresan
Constructor Summary | |
---|---|
MobiusJobRunner()
|
Method Summary | |
---|---|
static int |
run(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.util.Tool tool,
java.lang.String[] args)
Submit the tool with the specified conf and args . |
static int |
run(org.apache.hadoop.util.Tool tool,
java.lang.String[] args)
submit the tool with specified args . |
Methods inherited from class org.apache.hadoop.util.ToolRunner |
---|
printGenericCommandUsage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MobiusJobRunner()
Method Detail |
---|
public static int run(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.util.Tool tool, java.lang.String[] args) throws java.lang.Exception
tool
with the specified conf
and args
.
tool
can be MobiusJob
or any instance of Tool
.
If tool
is an instance of MobiusJob
, it will be submitted using
JobControl
. If it's not an instance of MobiusJob
, then it will be submitted
using ToolRunner.run(conf, tool, args)
directly.
java.lang.Exception
public static int run(org.apache.hadoop.util.Tool tool, java.lang.String[] args) throws java.lang.Exception
tool
with specified args
.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |