|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.oozie.command.Command<T,CoordinatorStore>
org.apache.oozie.command.coord.CoordinatorCommand<java.lang.String>
org.apache.oozie.command.coord.CoordSubmitCommand
public class CoordSubmitCommand
This class provides the functionalities to resolve a coordinator job XML and write the job information into a DB table.
Specifically it performs the following functions: 1. Resolve all the variables or properties using job configurations. 2. Insert all datasets definition as part of the
Field Summary | |
---|---|
static java.lang.String |
CONF_DEFAULT_TIMEOUT_NORMAL
Default timeout for normal jobs, in minutes, after which coordinator input check will timeout |
static java.lang.String |
CONFIG_DEFAULT
|
static java.lang.String |
COORDINATOR_XML_FILE
|
Fields inherited from class org.apache.oozie.command.Command |
---|
instrumentation, LOCK_FAILURE_REQUEUE_INTERVAL, type |
Constructor Summary | |
---|---|
CoordSubmitCommand(boolean dryrun,
org.apache.hadoop.conf.Configuration conf,
java.lang.String authToken)
|
|
CoordSubmitCommand(org.apache.hadoop.conf.Configuration conf,
java.lang.String authToken)
Constructor to create the Coordinator Submit Command. |
Method Summary | |
---|---|
org.jdom.Element |
basicResolveAndIncludeDS(java.lang.String appXml,
org.apache.hadoop.conf.Configuration conf,
CoordinatorJobBean coordJob)
The method resolve all the variables that are defined in configuration. |
protected java.lang.String |
call(CoordinatorStore store)
DagCallable subclasses must implement this method to perform their task. |
protected void |
includeDataSets(org.jdom.Element resolvedXml,
org.apache.hadoop.conf.Configuration conf)
Include referred Datasets into XML. |
protected void |
initEvaluators()
Initialize all the required EL Evaluators. |
static void |
main(java.lang.String[] args)
For unit-testing only. |
protected void |
mergeDefaultConfig()
Merge default configuration with user-defined configuration. |
protected java.lang.String |
readDefinition(java.lang.String appPath,
java.lang.String fileName)
Read workflow definition. |
protected org.jdom.Element |
resolveInitial(org.apache.hadoop.conf.Configuration conf,
java.lang.String appXml,
CoordinatorJobBean coordJob)
Resolve basic entities using job Configuration. |
Methods inherited from class org.apache.oozie.command.coord.CoordinatorCommand |
---|
getStoreClass |
Methods inherited from class org.apache.oozie.command.Command |
---|
call, execute, getCreatedTime, getInstrumentation, getName, getPriority, getType, incrCommandCounter, incrJobCounter, incrJobCounter, lock, logQueueCallableFalse, queueCallable, queueCallable, queueCallable, queueCallableForException, resetLogInfoAction, resetLogInfoWorkflow, setLogInfo, setLogInfo, setLogInfo, setLogInfo, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONFIG_DEFAULT
public static final java.lang.String COORDINATOR_XML_FILE
public static final java.lang.String CONF_DEFAULT_TIMEOUT_NORMAL
Constructor Detail |
---|
public CoordSubmitCommand(org.apache.hadoop.conf.Configuration conf, java.lang.String authToken)
conf
- : Configuration for Coordinator jobauthToken
- : To be used for authenticationpublic CoordSubmitCommand(boolean dryrun, org.apache.hadoop.conf.Configuration conf, java.lang.String authToken)
Method Detail |
---|
protected java.lang.String call(CoordinatorStore store) throws StoreException, CommandException
Command
call
in class Command<java.lang.String,CoordinatorStore>
store
- the workflow store instance for the callable, null
if the callable does not use a
store.
StoreException
- thrown if the workflow store could not perform an operation.
CommandException
- thrown if the command could not perform its operation.protected void mergeDefaultConfig() throws CommandException
CommandException
public org.jdom.Element basicResolveAndIncludeDS(java.lang.String appXml, org.apache.hadoop.conf.Configuration conf, CoordinatorJobBean coordJob) throws CoordinatorJobException, java.lang.Exception
appXml
- : Original job XMLconf
- : Configuration of the jobcoordJob
- : Coordinator job bean to be populated.
java.lang.Exception
CoordinatorJobException
protected void initEvaluators()
protected org.jdom.Element resolveInitial(org.apache.hadoop.conf.Configuration conf, java.lang.String appXml, CoordinatorJobBean coordJob) throws CoordinatorJobException, java.lang.Exception
conf
- :Job configurationappXml
- : Original job XMLcoordJob
- : Coordinator job bean to be populated.
java.lang.Exception
CoordinatorJobException
protected void includeDataSets(org.jdom.Element resolvedXml, org.apache.hadoop.conf.Configuration conf) throws CoordinatorJobException
resolvedXml
- : Job XML element.conf
- : Job configuration
CoordinatorJobException
protected java.lang.String readDefinition(java.lang.String appPath, java.lang.String fileName) throws CoordinatorJobException
appPath
- application path.user
- user name.group
- group name.autToken
- authentication token.
WorkflowException
- thrown if the definition could not be read.
CoordinatorJobException
public static void main(java.lang.String[] args) throws java.lang.Exception
args
-
java.lang.Exception
org.jdom.JDOMException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |