org.apache.oozie.command.wf
Class SubmitHttpXCommand

java.lang.Object
  extended by org.apache.oozie.command.XCommand<T>
      extended by org.apache.oozie.command.wf.WorkflowXCommand<String>
          extended by org.apache.oozie.command.wf.SubmitHttpXCommand
All Implemented Interfaces:
Callable<String>, XCallable<String>
Direct Known Subclasses:
SubmitMRXCommand, SubmitScriptLanguageXCommand, SubmitSqoopXCommand

public abstract class SubmitHttpXCommand
extends WorkflowXCommand<String>


Field Summary
protected static Set<String> MANDATORY_OOZIE_CONFS
           
protected static Set<String> OPTIONAL_OOZIE_CONFS
           
 
Fields inherited from class org.apache.oozie.command.wf.WorkflowXCommand
INSTR_FAILED_JOBS_COUNTER_NAME, INSTR_KILLED_JOBS_COUNTER_NAME, INSTR_SUCCEEDED_JOBS_COUNTER_NAME
 
Fields inherited from class org.apache.oozie.command.XCommand
DEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG, logInfo
 
Constructor Summary
SubmitHttpXCommand(String name, String type, org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
protected  void checkMandatoryConf(org.apache.hadoop.conf.Configuration conf)
           
protected  String execute()
          Command execution body.
protected  org.jdom.Element generateConfigurationSection(List<String> Dargs, org.jdom.Namespace ns)
           
protected abstract  org.jdom.Element generateSection(org.apache.hadoop.conf.Configuration conf, org.jdom.Namespace ns)
           
protected abstract  org.jdom.Namespace getSectionNamespace()
           
protected abstract  String getWorkflowName()
           
protected  org.jdom.Namespace getWorkflowNamespace()
           
protected  String getWorkflowXml(org.apache.hadoop.conf.Configuration conf)
          Generate workflow xml from conf object
 
Methods inherited from class org.apache.oozie.command.wf.WorkflowXCommand
generateEvent, generateEvent, generateEvent, updateParentIfNecessary, updateParentIfNecessary
 
Methods inherited from class org.apache.oozie.command.XCommand
call, call, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getEntityKey, getInstrumentation, getKey, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isLockRequired, isReQueueRequired, loadState, queue, queue, resetUsed, setInterruptMode, toString, verifyPrecondition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MANDATORY_OOZIE_CONFS

protected static final Set<String> MANDATORY_OOZIE_CONFS

OPTIONAL_OOZIE_CONFS

protected static final Set<String> OPTIONAL_OOZIE_CONFS
Constructor Detail

SubmitHttpXCommand

public SubmitHttpXCommand(String name,
                          String type,
                          org.apache.hadoop.conf.Configuration conf)
Method Detail

generateSection

protected abstract org.jdom.Element generateSection(org.apache.hadoop.conf.Configuration conf,
                                                    org.jdom.Namespace ns)

getSectionNamespace

protected abstract org.jdom.Namespace getSectionNamespace()

getWorkflowName

protected abstract String getWorkflowName()

checkMandatoryConf

protected void checkMandatoryConf(org.apache.hadoop.conf.Configuration conf)

getWorkflowNamespace

protected org.jdom.Namespace getWorkflowNamespace()

getWorkflowXml

protected String getWorkflowXml(org.apache.hadoop.conf.Configuration conf)
Generate workflow xml from conf object

Parameters:
conf - the configuration object
Returns:
workflow xml def string representation

generateConfigurationSection

protected org.jdom.Element generateConfigurationSection(List<String> Dargs,
                                                        org.jdom.Namespace ns)

execute

protected String execute()
                  throws CommandException
Description copied from class: XCommand
Command execution body.

This method will be invoked after the {link #loadState} and {link #verifyPrecondition} methods.

If the command requires locking, this method will be invoked ONLY if the lock has been acquired.

Specified by:
execute in class XCommand<String>
Returns:
a return value from the execution of the command, only meaningful if the command is executed synchronously.
Throws:
CommandException - thrown if the command execution failed.


Copyright © 2015 Apache Software Foundation. All Rights Reserved.