org.apache.oozie.command
Class MaterializeTransitionXCommand

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.MaterializeTransitionXCommand
All Implemented Interfaces:
Callable<Void>, XCallable<Void>
Direct Known Subclasses:
CoordMaterializeTransitionXCommand

public abstract class MaterializeTransitionXCommand
extends TransitionXCommand<Void>

Transition command for materialize the job. The derived class has to override these following functions:

loadState() : load the job's and/or actions' state updateJob() : update job status and attributes StartChildren() : submit or queue commands to start children notifyParent() : update the status to upstream if any


Field Summary
 
Fields inherited from class org.apache.oozie.command.TransitionXCommand
job
 
Fields inherited from class org.apache.oozie.command.XCommand
DEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, instrumentation, INSTRUMENTATION_GROUP, LOG, logInfo
 
Constructor Summary
MaterializeTransitionXCommand(String name, String type, int priority)
          The constructor for abstract class MaterializeTransitionXCommand
MaterializeTransitionXCommand(String name, String type, int priority, boolean dryrun)
          The constructor for abstract class MaterializeTransitionXCommand
 
Method Summary
protected  Void execute()
          Command execution body.
protected abstract  void materialize()
          Materialize the actions for current job
 void transitToNext()
          Transit to the next status based on the result of the Job.
 
Methods inherited from class org.apache.oozie.command.TransitionXCommand
getJob, notifyParent, setJob, updateJob
 
Methods inherited from class org.apache.oozie.command.XCommand
call, eagerLoadState, eagerVerifyPrecondition, getCreatedTime, getEntityKey, getInstrumentation, getKey, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, isLockRequired, isReQueueRequired, loadState, queue, queue, resetUsed, verifyPrecondition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaterializeTransitionXCommand

public MaterializeTransitionXCommand(String name,
                                     String type,
                                     int priority)
The constructor for abstract class MaterializeTransitionXCommand

Parameters:
name - the command name
type - the command type
priority - the command priority

MaterializeTransitionXCommand

public MaterializeTransitionXCommand(String name,
                                     String type,
                                     int priority,
                                     boolean dryrun)
The constructor for abstract class MaterializeTransitionXCommand

Parameters:
name - the command name
type - the command type
priority - the command priority
dryrun - true if dryrun is enable
Method Detail

transitToNext

public void transitToNext()
                   throws CommandException
Description copied from class: TransitionXCommand
Transit to the next status based on the result of the Job.

Specified by:
transitToNext in class TransitionXCommand<Void>
Throws:
CommandException

materialize

protected abstract void materialize()
                             throws CommandException
Materialize the actions for current job

Throws:
CommandException - thrown if failed to materialize

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 © 2012 Apache Software Foundation. All Rights Reserved.