@InterfaceAudience.Private
public abstract class TezExampleBase
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COUNTER_LOG |
protected static String |
DISABLE_SPLIT_GROUPING |
protected static String |
GENERATE_SPLIT_IN_CLIENT |
protected static String |
LEAVE_AM_RUNNING |
protected static String |
LOCAL_MODE |
protected static String |
RECONNECT_APP_ID |
| Constructor and Description |
|---|
TezExampleBase() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.records.ApplicationId |
getAppId() |
protected boolean |
isCountersLog() |
protected boolean |
isDisableSplitGrouping() |
protected boolean |
isGenerateSplitInClient() |
protected void |
printExtraOptionsUsage(PrintStream ps) |
protected abstract void |
printUsage()
Print usage instructions for this example
|
int |
run(String[] args) |
int |
run(TezConfiguration conf,
String[] args,
TezClient tezClient)
Utility method to use the example from within code or a test.
|
int |
runDag(DAG dag,
boolean printCounters,
org.slf4j.Logger logger) |
protected abstract int |
runJob(String[] args,
TezConfiguration tezConf,
TezClient tezClient)
Create and execute the actual DAG for the example
|
protected abstract int |
validateArgs(String[] otherArgs)
Validate the arguments
|
protected static final String DISABLE_SPLIT_GROUPING
protected static final String LOCAL_MODE
protected static final String COUNTER_LOG
protected static final String GENERATE_SPLIT_IN_CLIENT
protected static final String LEAVE_AM_RUNNING
protected static final String RECONNECT_APP_ID
protected boolean isCountersLog()
protected boolean isDisableSplitGrouping()
protected boolean isGenerateSplitInClient()
public final int run(String[] args) throws Exception
run in interface org.apache.hadoop.util.ToolExceptionpublic int run(TezConfiguration conf, String[] args, @Nullable TezClient tezClient) throws Exception
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 configuration. If TezClient is specified, local mode option can not been
specified in arguments, it takes no effect.Exceptionpublic int runDag(DAG dag, boolean printCounters, org.slf4j.Logger logger) throws TezException, InterruptedException, IOException
dag - the dag to executeprintCounters - whether to print counters or notlogger - the logger to use while printing diagnosticsTezExceptionInterruptedExceptionIOExceptionprotected abstract void printUsage()
protected void printExtraOptionsUsage(PrintStream ps)
protected abstract int validateArgs(String[] otherArgs)
otherArgs - arguments, if anyprotected abstract int runJob(String[] args, TezConfiguration tezConf, TezClient tezClient) throws Exception
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.slf4j.Logger) should be usedIOExceptionTezExceptionException@InterfaceAudience.Private public org.apache.hadoop.yarn.api.records.ApplicationId getAppId()
Copyright © 2021 Apache Software Foundation. All rights reserved.