org.apache.oozie.command
Class SubmitTransitionXCommand
java.lang.Object
org.apache.oozie.command.XCommand<T>
org.apache.oozie.command.TransitionXCommand<String>
org.apache.oozie.command.SubmitTransitionXCommand
- All Implemented Interfaces:
- Callable<String>, XCallable<String>
- Direct Known Subclasses:
- BundleSubmitXCommand, CoordSubmitXCommand
public abstract class SubmitTransitionXCommand
- extends TransitionXCommand<String>
Base class for submit transition command. The derived class has to override these following functions:
loadState() : load the job's and/or actions' state
submit() : submit the job
notifyParent() : update the status to upstream if any
Method Summary |
protected String |
execute()
Command execution body. |
protected abstract String |
submit()
Submit the job |
void |
transitToNext()
Transit to the next status based on the result of the Job. |
Methods inherited from class org.apache.oozie.command.XCommand |
call, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getEntityKey, getInstrumentation, getKey, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isLockRequired, isReQueueRequired, loadState, queue, queue, resetUsed, setInterruptMode, verifyPrecondition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubmitTransitionXCommand
public SubmitTransitionXCommand(String name,
String type,
int priority)
- The constructor for abstract class
SubmitTransitionXCommand
- Parameters:
name
- the command nametype
- the command typepriority
- the command priority
SubmitTransitionXCommand
public SubmitTransitionXCommand(String name,
String type,
int priority,
boolean dryrun)
- The constructor for abstract class
SubmitTransitionXCommand
- Parameters:
name
- the command nametype
- the command typepriority
- the command prioritydryrun
- true if dryrun is enable
submit
protected abstract String submit()
throws CommandException
- Submit the job
- Returns:
- the id
- Throws:
CommandException
- thrown if unable to submit
transitToNext
public void transitToNext()
- Description copied from class:
TransitionXCommand
- Transit to the next status based on the result of the Job.
- Specified by:
transitToNext
in class TransitionXCommand<String>
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.
- Overrides:
execute
in class TransitionXCommand<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 © 2013 Apache Software Foundation. All Rights Reserved.