public class CoordActionInputCheckXCommand extends CoordinatorXCommand<java.lang.Void>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONF_COORD_INPUT_CHECK_REQUEUE_INTERVAL
Property name of command re-queue interval for coordinator action input check in
milliseconds.
|
static java.lang.String |
COORD_EXECUTION_NONE_TOLERANCE |
DEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG| Constructor and Description |
|---|
CoordActionInputCheckXCommand(java.lang.String actionId,
java.lang.String jobId) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkInput(java.lang.StringBuilder actionXml,
java.lang.StringBuilder existList,
java.lang.StringBuilder nonExistList,
org.apache.hadoop.conf.Configuration conf)
To check the list of input paths if all of them exist
|
protected boolean |
checkUnResolvedInput(java.lang.StringBuilder actionXml,
org.apache.hadoop.conf.Configuration conf) |
protected java.lang.Void |
execute()
Command execution body.
|
protected java.lang.String |
getCoordActionErrorCode()
getting the error code of the coord action.
|
protected java.lang.String |
getCoordActionErrorMsg()
getting the error message of the coord action.
|
long |
getCoordInputCheckRequeueInterval()
This function reads the value of re-queue interval for coordinator input
check command from the Oozie configuration provided by Configuration
Service.
|
java.lang.String |
getEntityKey()
Return the entity key for the command.
|
java.lang.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 boolean |
pathExists(java.lang.String sPath,
org.apache.hadoop.conf.Configuration actionConf,
java.lang.String user)
Check if given path exists
|
protected void |
setLogInfo()
Set the thread local logInfo with the context of this command and reset log prefix.
|
protected void |
verifyPrecondition()
Verify the precondition for the command after a lock has been obtain, just before executing the command.
|
generateEvent, generateEventcall, call, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getInstrumentation, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isReQueueRequired, queue, queue, resetUsed, setInterruptMode, toStringpublic static final java.lang.String COORD_EXECUTION_NONE_TOLERANCE
public static final java.lang.String CONF_COORD_INPUT_CHECK_REQUEUE_INTERVAL
public CoordActionInputCheckXCommand(java.lang.String actionId, java.lang.String jobId)
protected void setLogInfo()
XCommandsetLogInfo in class XCommand<java.lang.Void>protected java.lang.Void execute() throws CommandException
XCommandexecute in class XCommand<java.lang.Void>CommandException - thrown if the command execution failed.public long getCoordInputCheckRequeueInterval()
protected boolean checkInput(java.lang.StringBuilder actionXml, java.lang.StringBuilder existList, java.lang.StringBuilder nonExistList, org.apache.hadoop.conf.Configuration conf) throws java.lang.Exception
actionXml - action xmlexistList - the list of existed pathsnonExistList - the list of non existed pathsconf - action configurationjava.lang.Exception - thrown of unable to check input pathprotected boolean checkUnResolvedInput(java.lang.StringBuilder actionXml, org.apache.hadoop.conf.Configuration conf) throws java.lang.Exception
java.lang.Exceptionprotected boolean pathExists(java.lang.String sPath, org.apache.hadoop.conf.Configuration actionConf, java.lang.String user) throws java.io.IOException
sPath - uri pathactionConf - action configurationjava.io.IOException - thrown if unable to access the pathprotected java.lang.String getCoordActionErrorCode()
protected java.lang.String getCoordActionErrorMsg()
public java.lang.String getEntityKey()
XCommandgetEntityKey in interface XCallable<java.lang.Void>getEntityKey in class XCommand<java.lang.Void>protected boolean isLockRequired()
XCommandisLockRequired in class XCommand<java.lang.Void>true/falseprotected void loadState() throws CommandException
XCommandloadState in class XCommand<java.lang.Void>CommandExceptionprotected void verifyPrecondition() throws CommandException, PreconditionException
XCommandverifyPrecondition in class XCommand<java.lang.Void>CommandException - thrown if the precondition is not met.PreconditionExceptionCopyright © 2017 Apache Software Foundation. All Rights Reserved.