public class CoordMaterializeTransitionXCommand extends MaterializeTransitionXCommand
| Modifier and Type | Field and Description |
|---|---|
static String |
CONF_DEFAULT_MAX_TIMEOUT
Default MAX timeout in minutes, after which coordinator input check will timeout
|
insertList, job, updateListDEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG, logInfo| Constructor and Description |
|---|
CoordMaterializeTransitionXCommand(String jobId,
int materializationWindow)
The constructor for class
CoordMaterializeTransitionXCommand |
| Modifier and Type | Method and Description |
|---|---|
protected void |
calcMatdTime()
Calculate startMatdTime and endMatdTime from job's start time if next materialized time is null
|
String |
getEntityKey()
Return the entity key for the command.
|
String |
getKey()
Get command key
|
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 |
materialize()
Materialize the actions for current job
|
protected String |
materializeActions(boolean dryrun)
Create action instances starting from "startMatdTime" to "endMatdTime" and store them into coord action table.
|
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 |
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.
|
executegenerateEvents, getJob, setJobcall, call, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getInstrumentation, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isReQueueRequired, queue, queue, resetUsed, setInterruptMode, toStringpublic static final String CONF_DEFAULT_MAX_TIMEOUT
public CoordMaterializeTransitionXCommand(String jobId, int materializationWindow)
CoordMaterializeTransitionXCommandjobId - coordinator job idmaterializationWindow - materialization window to calculate end timelookahead - windowpublic void transitToNext() throws CommandException
TransitionXCommandtransitToNext in class MaterializeTransitionXCommandCommandExceptionpublic void updateJob() throws CommandException
TransitionXCommandupdateJob in class TransitionXCommand<Void>CommandExceptionpublic void performWrites() throws CommandException
TransitionXCommandperformWrites in class TransitionXCommand<Void>CommandExceptionpublic String getEntityKey()
XCommandgetEntityKey in interface XCallable<Void>getEntityKey in class XCommand<Void>protected boolean isLockRequired()
XCommandisLockRequired in class XCommand<Void>true/falseprotected void loadState() throws CommandException
XCommandloadState in class XCommand<Void>CommandExceptionprotected void calcMatdTime() throws CommandException
CommandException - thrown if failed to calculate startMatdTime and endMatdTimeprotected void verifyPrecondition() throws CommandException, PreconditionException
XCommandverifyPrecondition in class XCommand<Void>CommandException - thrown if the precondition is not met.PreconditionExceptionprotected void materialize() throws CommandException
MaterializeTransitionXCommandmaterialize in class MaterializeTransitionXCommandCommandException - thrown if failed to materializeprotected String materializeActions(boolean dryrun) throws Exception
dryrun - if this is a dry runException - thrown if failed to materialize actionspublic void notifyParent() throws CommandException
TransitionXCommandnotifyParent in class TransitionXCommand<Void>CommandExceptionCopyright © 2014 Apache Software Foundation. All Rights Reserved.