As the long-running scheduler and execution environment process a grid batch job, the job state updates in the long-running scheduler database. The diagram shows the relationship between states, and the following table lists the possible batch job states and the events that trigger transitions between states. You can view the current state of a batch job from the administrative console, or retrieve it using the command line or Enterprise JavaBeans (EJB). If a failure occurs before a batch step initializes, then the batch job goes into start failed state. Otherwise, it goes into restartable state.
Start State | Client Command | LREE Action | Special Condition | End State |
---|---|---|---|---|
non-existent (delayed submit) | submit | Not applicable | Not applicable | pending submit |
non-existent | submit | Not applicable | Not applicable | submitted |
submitted | Not applicable | dispatch | Not applicable | executing |
submitted | cancel | Not applicable | Not applicable | restartable |
executing | cancel | Not applicable | cancel_pending | |
executing | caught application error* | restartable | ||
executing | Infrastructure problem** | restartable | ||
executing | suspend | suspend_pending | ||
executing | Not applicable | job completed | Not applicable | ended |
executing | Not applicable | Not applicable | Infrastructure problem in job setup*** | execution_failed |
suspend_pending | checkpoint cancelled | suspended | ||
suspend_pending | Infrastructure problem** | restartable | ||
suspended | resume | resume_pending | ||
suspended | cancel | cancel_pending | ||
suspended | Infrastructure problem** | restartable | ||
resume_pending | job resumed | executing | ||
resume_pending | Infrastructure problem** | restartable | ||
restartable | restart | submitted | ||
cancel_pending | Not applicable | job cancelled | restartable | |
cancel_pending | Not applicable | Not applicable | Infrastructure problem** | restartable |
restartable | purge | non-existent | ||
execution_failed | purge | Not applicable | Not applicable | non-existent |
ended | purge | Not applicable | Not applicable | non-existent |
* Application error |
The batch application failed at runtime. The long-running execution environment detected this failure. |
** Infrastructure problem |
An unprecedented error has occurred. For example, a power outage. |
*** Infrastructure problem in job setup |
An unprecedented error that occurs when a batch job is set up for the first time by the long-running execution environment. For example, if there is an unexpected database failure, the job goes into execution_failed state. This is a condition where the batch job is run for the first time and no steps are processed yet. Batch jobs go into the restartable state under most failure conditions so that they can restart from checkpointed positions if the failure condition can be overcome. However, this is an instance of a failure condition where a batch job goes into execution_failed state and cannot be restarted. Since this is a job setup scenario and work is not yet processed by the batch job. Batch work is not lost as a result of failure. |