A Job resource represents a single Flink job. The Job resource is derived from a Deployment Template whenever Application manager detects that a new Flink job is needed.
Currently the Job resource is exclusively managed by Application Manager and it is not possible to create one manually. Once the Job resource is created, its spec section is effectively immutable and represents a point in time of the spec definition of the owning Deployment resource.
status.state field of the Job resource has the following states:
- STARTING: The job is in the process of starting. This includes requesting resources from the Deployment Target and submitting the specified job to it.
- STARTED: The Job was successfully started.
- TERMINATING: The Job is in the process of terminating.
- TERMINATED: The Job is terminated.
- FAILED: The deployment target or Flink have reported an unrecoverable failure. Application Manager may report additional failure details.
Below state machine shows the possible transitions of a Job’s status:
Application Manager keeps all jobs in a terminal state. This allows users to trace back the evolution of the Deployment specification, such as parallelism and other configuration parameters.
The Job resource
status.state is not the same as the Flink job status since the Job resource state includes phases of acquiring resources from the Deployment Target.