public class BundleSubmitXCommand extends SubmitTransitionXCommand
| Modifier and Type | Field and Description |
|---|---|
static String |
BUNDLE_XML_FILE |
static String |
CONFIG_DEFAULT |
insertList, job, updateListDEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG| Constructor and Description |
|---|
BundleSubmitXCommand(boolean dryrun,
org.apache.hadoop.conf.Configuration conf)
Constructor to create the bundle submit command.
|
BundleSubmitXCommand(org.apache.hadoop.conf.Configuration conf)
Constructor to create the bundle submit command.
|
| Modifier and Type | Method and Description |
|---|---|
ELEvaluator |
createEvaluator(org.apache.hadoop.conf.Configuration conf)
Create ELEvaluator
|
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.
|
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 |
mergeDefaultConfig()
Merge default configuration with user-defined configuration.
|
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.
|
protected String |
readDefinition(String appPath)
Read bundle definition.
|
protected String |
submit()
Submit 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, transitToNextgenerateEvents, setJobcall, call, executeInterrupts, getCreatedTime, getInstrumentation, getKey, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isReQueueRequired, queue, queue, resetUsed, setInterruptMode, setLogInfo, toStringpublic static final String CONFIG_DEFAULT
public static final String BUNDLE_XML_FILE
public BundleSubmitXCommand(org.apache.hadoop.conf.Configuration conf)
conf - configuration for bundle jobpublic BundleSubmitXCommand(boolean dryrun, org.apache.hadoop.conf.Configuration conf)
dryrun - true if dryrun is enableconf - configuration for bundle jobprotected String submit() throws CommandException
SubmitTransitionXCommandsubmit in class SubmitTransitionXCommandCommandException - thrown if unable to submitpublic void notifyParent() throws CommandException
TransitionXCommandnotifyParent in class TransitionXCommand<String>CommandExceptionpublic String getEntityKey()
XCommandgetEntityKey in interface XCallable<String>getEntityKey in class XCommand<String>protected boolean isLockRequired()
XCommandisLockRequired in class XCommand<String>true/falseprotected void loadState() throws CommandException
XCommandloadState in class XCommand<String>CommandExceptionprotected void verifyPrecondition() throws CommandException, PreconditionException
XCommandverifyPrecondition in class XCommand<String>CommandException - thrown if the precondition is not met.PreconditionExceptionprotected void eagerLoadState() throws CommandException
XCommandeagerLoadState in class XCommand<String>CommandExceptionprotected void eagerVerifyPrecondition() throws CommandException, PreconditionException
XCommandeagerVerifyPrecondition in class XCommand<String>CommandException - thrown if the precondition is not met.PreconditionExceptionprotected void mergeDefaultConfig() throws CommandException
CommandException - thrown if failed to merge configurationprotected String readDefinition(String appPath) throws BundleJobException
appPath - application path.user - user name.group - group name.BundleJobException - thrown if the definition could not be read.public Job getJob()
TransitionXCommandgetJob in class TransitionXCommand<String>public ELEvaluator createEvaluator(org.apache.hadoop.conf.Configuration conf) throws BundleJobException
conf - job configurationBundleJobException - thrown if failed to create evaluatorpublic void updateJob() throws CommandException
TransitionXCommandupdateJob in class TransitionXCommand<String>CommandExceptionpublic void performWrites() throws CommandException
TransitionXCommandperformWrites in class TransitionXCommand<String>CommandExceptionCopyright © 2015 Apache Software Foundation. All Rights Reserved.