com.ebay.erl.mobius.core
Class MobiusJobRunner

java.lang.Object
  extended by org.apache.hadoop.util.ToolRunner
      extended by com.ebay.erl.mobius.core.MobiusJobRunner

public class MobiusJobRunner
extends org.apache.hadoop.util.ToolRunner

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

MobiusJobRunner

public MobiusJobRunner()
Method Detail

run

public static int run(org.apache.hadoop.conf.Configuration conf,
                      org.apache.hadoop.util.Tool tool,
                      java.lang.String[] args)
               throws java.lang.Exception
Submit the 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.

Throws:
java.lang.Exception

run

public static int run(org.apache.hadoop.util.Tool tool,
                      java.lang.String[] args)
               throws java.lang.Exception
submit the tool with specified args.

Throws:
java.lang.Exception