|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.command.XCommand<T> org.apache.oozie.command.TransitionXCommand<String> org.apache.oozie.command.SubmitTransitionXCommand org.apache.oozie.command.coord.CoordSubmitXCommand
public class CoordSubmitXCommand
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 String |
CONF_DEFAULT_CONCURRENCY
|
static String |
CONF_DEFAULT_MAX_TIMEOUT
Default MAX timeout in minutes, after which coordinator input check will timeout |
static String |
CONF_DEFAULT_THROTTLE
|
static String |
CONF_DEFAULT_TIMEOUT_NORMAL
Default timeout for normal jobs, in minutes, after which coordinator input check will timeout |
static String |
CONF_MAT_THROTTLING_FACTOR
|
static String |
CONF_QUEUE_SIZE
|
static String |
CONFIG_DEFAULT
|
String |
COORD_INPUT_EVENTS
|
String |
COORD_INPUT_EVENTS_DATA_IN
|
String |
COORD_OUTPUT_EVENTS
|
String |
COORD_OUTPUT_EVENTS_DATA_OUT
|
static String |
COORDINATOR_XML_FILE
|
Fields inherited from class org.apache.oozie.command.TransitionXCommand |
---|
insertList, job, updateList |
Fields inherited from class org.apache.oozie.command.XCommand |
---|
DEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, instrumentation, INSTRUMENTATION_GROUP, LOG, logInfo |
Constructor Summary | |
---|---|
CoordSubmitXCommand(boolean dryrun,
org.apache.hadoop.conf.Configuration conf,
String authToken)
Constructor to create the Coordinator Submit Command. |
|
CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf,
String authToken)
Constructor to create the Coordinator Submit Command. |
|
CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf,
String authToken,
String bundleId,
String coordName)
Constructor to create the Coordinator Submit Command by bundle job. |
Method Summary | |
---|---|
org.jdom.Element |
basicResolveAndIncludeDS(String appXml,
org.apache.hadoop.conf.Configuration conf,
CoordinatorJobBean coordJob)
The method resolve all the variables that are defined in configuration. |
String |
getEntityKey()
Return the entity key for the command. |
org.apache.oozie.client.Job |
getJob()
Get the Job for the command. |
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. |
protected boolean |
isLockRequired()
Indicate if the the command requires locking. |
protected void |
loadState()
Load the necessary state to perform the precondition check and to execute the command. |
protected void |
mergeDefaultConfig()
Merge default configuration with user-defined configuration. |
void |
notifyParent()
This will be used to notify the parent about the status of that perticular job. |
void |
performWrites()
This will be used to perform atomically all the writes within this command. |
protected String |
readDefinition(String appPath)
Read coordinator definition. |
protected org.jdom.Element |
resolveInitial(org.apache.hadoop.conf.Configuration conf,
String appXml,
CoordinatorJobBean coordJob)
Resolve basic entities using job Configuration. |
protected String |
submit()
Submit the job |
void |
updateJob()
Update the parent job. |
protected void |
verifyPrecondition()
Verify the precondition for the command after a lock has been obtain, just before executing the command. |
Methods inherited from class org.apache.oozie.command.SubmitTransitionXCommand |
---|
execute, transitToNext |
Methods inherited from class org.apache.oozie.command.TransitionXCommand |
---|
setJob |
Methods inherited from class org.apache.oozie.command.XCommand |
---|
call, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getInstrumentation, getKey, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isReQueueRequired, queue, queue, resetUsed, setInterruptMode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIG_DEFAULT
public static final String COORDINATOR_XML_FILE
public final String COORD_INPUT_EVENTS
public final String COORD_OUTPUT_EVENTS
public final String COORD_INPUT_EVENTS_DATA_IN
public final String COORD_OUTPUT_EVENTS_DATA_OUT
public static final String CONF_DEFAULT_TIMEOUT_NORMAL
public static final String CONF_DEFAULT_CONCURRENCY
public static final String CONF_DEFAULT_THROTTLE
public static final String CONF_MAT_THROTTLING_FACTOR
public static final String CONF_DEFAULT_MAX_TIMEOUT
public static final String CONF_QUEUE_SIZE
Constructor Detail |
---|
public CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf, String authToken)
conf
- : Configuration for Coordinator jobauthToken
- : To be used for authenticationpublic CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf, String authToken, String bundleId, String coordName)
conf
- : Configuration for Coordinator jobauthToken
- : To be used for authenticationbundleId
- : bundle idcoordName
- : coord namepublic CoordSubmitXCommand(boolean dryrun, org.apache.hadoop.conf.Configuration conf, String authToken)
dryrun
- : if dryrunconf
- : Configuration for Coordinator jobauthToken
- : To be used for authenticationMethod Detail |
---|
protected String submit() throws CommandException
SubmitTransitionXCommand
submit
in class SubmitTransitionXCommand
CommandException
- thrown if unable to submitprotected void mergeDefaultConfig() throws CommandException
CommandException
- thrown if failed to read or merge configurationspublic org.jdom.Element basicResolveAndIncludeDS(String appXml, org.apache.hadoop.conf.Configuration conf, CoordinatorJobBean coordJob) throws CoordinatorJobException, Exception
appXml
- : Original job XMLconf
- : Configuration of the jobcoordJob
- : Coordinator job bean to be populated.
CoordinatorJobException
- thrown if failed to resolve basic entities or include referred datasets
Exception
- thrown if failed to resolve basic entities or include referred datasetsprotected void initEvaluators()
protected org.jdom.Element resolveInitial(org.apache.hadoop.conf.Configuration conf, String appXml, CoordinatorJobBean coordJob) throws CoordinatorJobException, Exception
conf
- :Job configurationappXml
- : Original job XMLcoordJob
- : Coordinator job bean to be populated.
CoordinatorJobException
- thrown if failed to resolve basic entities
Exception
- thrown if failed to resolve basic entitiesprotected void includeDataSets(org.jdom.Element resolvedXml, org.apache.hadoop.conf.Configuration conf) throws CoordinatorJobException
resolvedXml
- : Job XML element.conf
- : Job configuration
CoordinatorJobException
- thrown if failed to include referred datasets into XMLprotected String readDefinition(String appPath) throws CoordinatorJobException
appPath
- application path.
CoordinatorJobException
- thrown if the definition could not be read.public String getEntityKey()
XCommand
getEntityKey
in interface XCallable<String>
getEntityKey
in class XCommand<String>
protected boolean isLockRequired()
XCommand
isLockRequired
in class XCommand<String>
true/false
protected void loadState() throws CommandException
XCommand
loadState
in class XCommand<String>
CommandException
protected void verifyPrecondition() throws CommandException
XCommand
verifyPrecondition
in class XCommand<String>
CommandException
- thrown if the precondition is not met.public void notifyParent() throws CommandException
TransitionXCommand
notifyParent
in class TransitionXCommand<String>
CommandException
public void updateJob() throws CommandException
TransitionXCommand
updateJob
in class TransitionXCommand<String>
CommandException
public org.apache.oozie.client.Job getJob()
TransitionXCommand
getJob
in class TransitionXCommand<String>
public void performWrites() throws CommandException
TransitionXCommand
performWrites
in class TransitionXCommand<String>
CommandException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |