WaitForJobCompletion

The WaitForJobCompletion activity is used to wait for the specified jobs to complete until it reaches the specified value of timeout.

General

The General tab has the following fields.

Field Module Property? Description
Name No The name of the activity in the process definition.
HCatalog Connection Yes Click to select an HCatalog Connection shared resource.

If no matching HCatalog Connection shared resources are found, click Create Shared Resource to create one.

Timeout Yes Specifies how long to wait for a job to complete (in milliseconds). The default value is 1200000 milliseconds.
Interval Yes Specifies the time interval in milliseconds, to check the job execution. The default value is 5000 milliseconds.

Description

Provide a short description for the activity.

Input

The values specified in this tab takes precedence over the ones in the corresponding fields in the General tab.

Input Item Data Type Description
jobId string Specifies the ID of the job to be waited for.
timeout long Specifies how long to wait for a job to complete (in milliseconds).
interval long Specifies the time interval in milliseconds to check the job execution.

Output

The output of the activity are as follows.

Output Item Data Type Description
Job
status startTime string Returns the start time of the job.
username string Returns the user name of the job owner.
jobID string Returns the ID of the job.
jobACLs string Returns ACLs for the job.
schedulingInfo string Returns the scheduling information associated with the job.
failureInfo string Returns the reason for the failure of the job.
jobId string Returns the ID of the job.
jobPriority string Returns the priority of the job.
runState string Returns the current running state of the job.
State string Returns the state of the job.
jobComplete string Returns the completion status of the job.
profile url string Returns the URL of the job.
jobID string Returns the ID of the job.
user string Returns the user name of the job owner.
queueName string Returns the queue name of Mapreduce.
jobFile string Returns the name of the job file.
jobName string Returns the name of the job.
jobId string Returns the ID of the job.
id string Returns the ID of the job.
parentId string Returns the parent ID of the job.
percentComplete string Returns the completion percentage of the job.
exitValue string Returns the exit value of the job. If a value of 0 is returned, it indicates that the job has been successful. Otherwise, the job completed with errors.
Note: You can get error messages of the job from the StatusDirectory\stderr directory. StatusDirectory is the value specified in the Status Directory field in the General tab of the activity that executed the job. The ErrorHandler process in the sample project shipped with the installer shows how to get error messages of a job. See Working with Sample Project for more information.
user string Returns the user name of the job owner.
callback string Returns the callback URL.
completed string Returns the completion status of the job. For example, done.

Fault

The Fault tab lists the exceptions that can be thrown by this activity.

ActivityFaultData Description
HadoopException
msg The error message description returned by the plug-in.
msgCode The error code returned by the plug-in.
ActivityTimeoutException
msg The error message description returned by TIBCO ActiveMatrix BusinessWorks.
msgCode The error code returned by TIBCO ActiveMatrix BusinessWorks.