public class CoordRerunXCommand extends RerunTransitionXCommand<CoordinatorActionInfo>
The "rerunType" can be set as RestConstants.JOB_COORD_SCOPE_DATE or RestConstants.JOB_COORD_SCOPE_ACTION.
The "refresh" is used to indicate if user wants to refresh an action's input and output events.
The "noCleanup" is used to indicate if user wants to cleanup output events for given rerun actions
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
prevPending |
static String |
RERUN_CONF |
jobId, prevStatus, retinsertList, job, updateListDEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG| Constructor and Description |
|---|
CoordRerunXCommand(String jobId,
String rerunType,
String scope,
boolean refresh,
boolean noCleanup,
boolean failed,
org.apache.hadoop.conf.Configuration actionRunConf)
The constructor for class
CoordRerunXCommand |
| Modifier and Type | Method and Description |
|---|---|
protected void |
eagerLoadState()
Load the necessary state to perform an eager precondition check.
|
protected void |
eagerVerifyPrecondition()
Verify the precondition for the command before obtaining a lock.
|
String |
getEntityKey()
Return the entity key for the command.
|
Job |
getJob()
Get the Job for the command.
|
XLog |
getLog()
Get XLog log
|
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.
|
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.
|
void |
rerunChildren()
Rerun actions associated with the job
|
void |
transitToNext()
Transit to the next status based on the result of 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.
|
execute, getPrevStatusgenerateEvents, setJobcall, executeInterrupts, getCreatedTime, getInstrumentation, getKey, getLockTimeOut, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isReQueueRequired, queue, queue, resetUsed, setInterruptMode, setLogInfo, toStringpublic static final String RERUN_CONF
protected boolean prevPending
public CoordRerunXCommand(String jobId, String rerunType, String scope, boolean refresh, boolean noCleanup, boolean failed, org.apache.hadoop.conf.Configuration actionRunConf)
CoordRerunXCommandjobId - the job idrerunType - rerun type RestConstants.JOB_COORD_SCOPE_DATE or RestConstants.JOB_COORD_SCOPE_ACTIONscope - the rerun scope for given rerunType separated by ","refresh - true if user wants to refresh input/output dataset urlsnoCleanup - false if user wants to cleanup output events for given rerun actionsfailed - true if user wants to rerun only failed nodesactionRunConf - configuration values for actionspublic String getEntityKey()
XCommandgetEntityKey in interface XCallable<CoordinatorActionInfo>getEntityKey in class XCommand<CoordinatorActionInfo>protected boolean isLockRequired()
XCommandSubclasses should override this method if they require locking.
isLockRequired in class XCommand<CoordinatorActionInfo>true/falseprotected void loadState() throws CommandException
XCommandSubclasses must implement this method and load the state needed to do the precondition check and execute the command.
loadState in class XCommand<CoordinatorActionInfo>CommandExceptionprotected void verifyPrecondition() throws CommandException, PreconditionException
XCommandverifyPrecondition in class RerunTransitionXCommand<CoordinatorActionInfo>CommandException - thrown if the precondition is not met.PreconditionExceptionprotected void eagerLoadState() throws CommandException
XCommandThis implementation does a NOP.
Subclasses should override this method and load the state needed to do an eager precondition check.
A trivial implementation is calling {link #loadState}.
eagerLoadState in class RerunTransitionXCommand<CoordinatorActionInfo>CommandExceptionprotected void eagerVerifyPrecondition() throws CommandException, PreconditionException
XCommandThis implementation does a NOP.
A trivial implementation is calling {link #verifyPrecondition}.
eagerVerifyPrecondition in class RerunTransitionXCommand<CoordinatorActionInfo>CommandException - thrown if the precondition is not met.PreconditionExceptionpublic void rerunChildren() throws CommandException
RerunTransitionXCommandrerunChildren in class RerunTransitionXCommand<CoordinatorActionInfo>CommandException - thrown if failed to rerun actionspublic Job getJob()
TransitionXCommandgetJob in class TransitionXCommand<CoordinatorActionInfo>public void notifyParent() throws CommandException
TransitionXCommandnotifyParent in class TransitionXCommand<CoordinatorActionInfo>CommandExceptionpublic void updateJob()
TransitionXCommandupdateJob in class TransitionXCommand<CoordinatorActionInfo>public void performWrites() throws CommandException
TransitionXCommandperformWrites in class TransitionXCommand<CoordinatorActionInfo>CommandExceptionpublic XLog getLog()
XCommandgetLog in class XCommand<CoordinatorActionInfo>public final void transitToNext()
TransitionXCommandtransitToNext in class RerunTransitionXCommand<CoordinatorActionInfo>Copyright © 2018 Apache Software Foundation. All rights reserved.