public class CoordSubmitXCommand extends SubmitTransitionXCommand
Modifier and Type | Field and Description |
---|---|
static String |
CONF_DEFAULT_CONCURRENCY |
static String |
CONF_DEFAULT_MAX_TIMEOUT
Default MAX timeout in minutes, after which coordinator input check will timeout
|
static String |
CONF_DEFAULT_THROTTLE |
static String |
CONF_DEFAULT_TIMEOUT_NORMAL
Default timeout for normal jobs, in minutes, after which coordinator input check will timeout
|
static String |
CONF_MAT_THROTTLING_FACTOR |
static String |
CONF_QUEUE_SIZE |
static String |
CONFIG_DEFAULT |
String |
COORD_INPUT_EVENTS |
String |
COORD_INPUT_EVENTS_DATA_IN |
String |
COORD_OUTPUT_EVENTS |
String |
COORD_OUTPUT_EVENTS_DATA_OUT |
static String |
COORDINATOR_XML_FILE |
insertList, job, updateList
DEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, eventService, instrumentation, INSTRUMENTATION_GROUP, LOG, logInfo
Constructor and Description |
---|
CoordSubmitXCommand(boolean dryrun,
org.apache.hadoop.conf.Configuration conf)
Constructor to create the Coordinator Submit Command.
|
CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf)
Constructor to create the Coordinator Submit Command.
|
CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf,
String bundleId,
String coordName)
Constructor to create the Coordinator Submit Command by bundle job.
|
Modifier and Type | Method and Description |
---|---|
org.jdom.Element |
basicResolveAndIncludeDS(String appXml,
org.apache.hadoop.conf.Configuration conf,
CoordinatorJobBean coordJob)
The method resolve all the variables that are defined in configuration.
|
String |
getEntityKey()
Return the entity key for the command.
|
org.apache.oozie.client.Job |
getJob()
Get the Job for the command.
|
protected void |
includeDataSets(org.jdom.Element resolvedXml,
org.apache.hadoop.conf.Configuration conf)
Include referred datasets into XML.
|
protected void |
initEvaluators()
Initialize all the required EL Evaluators.
|
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 coordinator definition.
|
protected org.jdom.Element |
resolveInitial(org.apache.hadoop.conf.Configuration conf,
String appXml,
CoordinatorJobBean coordJob)
Resolve basic entities using job Configuration.
|
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, transitToNext
generateEvents, setJob
call, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getInstrumentation, getKey, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isReQueueRequired, queue, queue, resetUsed, setInterruptMode
public static final String CONFIG_DEFAULT
public static final String COORDINATOR_XML_FILE
public final String COORD_INPUT_EVENTS
public final String COORD_OUTPUT_EVENTS
public final String COORD_INPUT_EVENTS_DATA_IN
public final String COORD_OUTPUT_EVENTS_DATA_OUT
public static final String CONF_DEFAULT_TIMEOUT_NORMAL
public static final String CONF_DEFAULT_CONCURRENCY
public static final String CONF_DEFAULT_THROTTLE
public static final String CONF_MAT_THROTTLING_FACTOR
public static final String CONF_DEFAULT_MAX_TIMEOUT
public static final String CONF_QUEUE_SIZE
public CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf)
conf
- : Configuration for Coordinator jobpublic CoordSubmitXCommand(org.apache.hadoop.conf.Configuration conf, String bundleId, String coordName)
conf
- : Configuration for Coordinator jobbundleId
- : bundle idcoordName
- : coord namepublic CoordSubmitXCommand(boolean dryrun, org.apache.hadoop.conf.Configuration conf)
dryrun
- : if dryrunconf
- : Configuration for Coordinator jobprotected String submit() throws CommandException
SubmitTransitionXCommand
submit
in class SubmitTransitionXCommand
CommandException
- thrown if unable to submitprotected void mergeDefaultConfig() throws CommandException
CommandException
- thrown if failed to read or merge configurationspublic org.jdom.Element basicResolveAndIncludeDS(String appXml, org.apache.hadoop.conf.Configuration conf, CoordinatorJobBean coordJob) throws CoordinatorJobException, Exception
appXml
- : Original job XMLconf
- : Configuration of the jobcoordJob
- : Coordinator job bean to be populated.CoordinatorJobException
- thrown if failed to resolve basic entities or include referred datasetsException
- thrown if failed to resolve basic entities or include referred datasetsprotected void initEvaluators()
protected org.jdom.Element resolveInitial(org.apache.hadoop.conf.Configuration conf, String appXml, CoordinatorJobBean coordJob) throws CoordinatorJobException, Exception
conf
- :Job configurationappXml
- : Original job XMLcoordJob
- : Coordinator job bean to be populated.CoordinatorJobException
- thrown if failed to resolve basic entitiesException
- thrown if failed to resolve basic entitiesprotected void includeDataSets(org.jdom.Element resolvedXml, org.apache.hadoop.conf.Configuration conf) throws CoordinatorJobException
resolvedXml
- : Job XML element.conf
- : Job configurationCoordinatorJobException
- thrown if failed to include referred datasets into XMLprotected String readDefinition(String appPath) throws CoordinatorJobException
appPath
- application path.CoordinatorJobException
- thrown if the definition could not be read.public String getEntityKey()
XCommand
getEntityKey
in interface XCallable<String>
getEntityKey
in class XCommand<String>
protected boolean isLockRequired()
XCommand
isLockRequired
in class XCommand<String>
true/false
protected void loadState() throws CommandException
XCommand
loadState
in class XCommand<String>
CommandException
protected void verifyPrecondition() throws CommandException
XCommand
verifyPrecondition
in class XCommand<String>
CommandException
- thrown if the precondition is not met.public void notifyParent() throws CommandException
TransitionXCommand
notifyParent
in class TransitionXCommand<String>
CommandException
public void updateJob() throws CommandException
TransitionXCommand
updateJob
in class TransitionXCommand<String>
CommandException
public org.apache.oozie.client.Job getJob()
TransitionXCommand
getJob
in class TransitionXCommand<String>
public void performWrites() throws CommandException
TransitionXCommand
performWrites
in class TransitionXCommand<String>
CommandException
Copyright © 2015 Apache Software Foundation. All Rights Reserved.