org.apache.oozie.command
Class SuspendTransitionXCommand

java.lang.Object
  extended by org.apache.oozie.command.XCommand<T>
      extended by org.apache.oozie.command.TransitionXCommand<Void>
          extended by org.apache.oozie.command.SuspendTransitionXCommand
All Implemented Interfaces:
Callable<Void>, XCallable<Void>
Direct Known Subclasses:
BundleJobSuspendXCommand, CoordSuspendXCommand

public abstract class SuspendTransitionXCommand
extends TransitionXCommand<Void>


Field Summary
 
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, dryrun, instrumentation, INSTRUMENTATION_GROUP, LOG, logInfo
 
Constructor Summary
SuspendTransitionXCommand(String name, String type, int priority)
           
SuspendTransitionXCommand(String name, String type, int priority, boolean dryrun)
           
 
Method Summary
protected  Void execute()
          Command execution body.
abstract  void suspendChildren()
          Suspend all children of the job
 void transitToNext()
          Transit job to suspended from running or to prepsuspended from prep.
 
Methods inherited from class org.apache.oozie.command.TransitionXCommand
getJob, notifyParent, performWrites, setJob, updateJob
 
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
 

Constructor Detail

SuspendTransitionXCommand

public SuspendTransitionXCommand(String name,
                                 String type,
                                 int priority)

SuspendTransitionXCommand

public SuspendTransitionXCommand(String name,
                                 String type,
                                 int priority,
                                 boolean dryrun)
Method Detail

suspendChildren

public abstract void suspendChildren()
                              throws CommandException
Suspend all children of the job

Throws:
CommandException

transitToNext

public void transitToNext()
Transit job to suspended from running or to prepsuspended from prep.

Specified by:
transitToNext in class TransitionXCommand<Void>
See Also:
TransitionXCommand.transitToNext()

execute

protected Void 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<Void>
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.