public abstract class TezExampleBase
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Constructor and Description |
|---|
TezExampleBase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
printUsage()
Print usage instructions for this example
|
int |
run(String[] args) |
int |
run(org.apache.tez.dag.api.TezConfiguration conf,
String[] args,
org.apache.tez.client.TezClient tezClient)
Utility method to use the example from within code or a test.
|
int |
runDag(org.apache.tez.dag.api.DAG dag,
boolean printCounters,
org.apache.commons.logging.Log logger) |
protected abstract int |
runJob(String[] args,
org.apache.tez.dag.api.TezConfiguration tezConf,
org.apache.tez.client.TezClient tezClient)
Create and execute the actual DAG for the example
|
protected abstract int |
validateArgs(String[] otherArgs)
Validate the arguments
|
public final int run(String[] args) throws Exception
run in interface org.apache.hadoop.util.ToolExceptionpublic int run(org.apache.tez.dag.api.TezConfiguration conf,
String[] args,
@Nullable
org.apache.tez.client.TezClient tezClient)
throws IOException,
org.apache.tez.dag.api.TezException,
InterruptedException
conf - the tez configuration instance which will be used to crate the DAG and
possible the Tez Client.args - arguments to the exampletezClient - an existing running TezClient instance if one
exists. If no TezClient is specified (null), one will be created based on the
provided configurationIOExceptionorg.apache.tez.dag.api.TezExceptionInterruptedExceptionpublic int runDag(org.apache.tez.dag.api.DAG dag,
boolean printCounters,
org.apache.commons.logging.Log logger)
throws org.apache.tez.dag.api.TezException,
InterruptedException,
IOException
dag - the dag to executeprintCounters - whether to print counters or notlogger - the logger to use while printing diagnosticsorg.apache.tez.dag.api.TezExceptionInterruptedExceptionIOExceptionprotected abstract void printUsage()
protected abstract int validateArgs(String[] otherArgs)
otherArgs - arguments, if anyprotected abstract int runJob(String[] args, org.apache.tez.dag.api.TezConfiguration tezConf, org.apache.tez.client.TezClient tezClient) throws IOException, org.apache.tez.dag.api.TezException, InterruptedException
args - arguments for executiontezConf - the tez configuration instance to be used while processing the DAGtezClient - the tez client instance to use to run the DAG if any custom monitoring is
required. Otherwise the utility method runDag(org.apache.tez.dag.api.DAG,
boolean, org.apache.commons.logging.Log) should be usedIOExceptionorg.apache.tez.dag.api.TezExceptionInterruptedExceptionCopyright © 2014 Apache Software Foundation. All rights reserved.