You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2019/11/01 18:47:05 UTC

[beam] 01/01: [BEAM-8539] Provide an initial definition of all job states and the state transition diagram

This is an automated email from the ASF dual-hosted git repository.

lcwik pushed a commit to branch beam8539
in repository https://gitbox.apache.org/repos/asf/beam.git

commit b09b1b643e9413f7ff7a1ccf5f6ac3f6700dcb0b
Author: Lukasz Cwik <lu...@gmail.com>
AuthorDate: Fri Nov 1 11:46:51 2019 -0700

    [BEAM-8539] Provide an initial definition of all job states and the state transition diagram
---
 model/job-management/src/main/proto/beam_job_api.proto | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/model/job-management/src/main/proto/beam_job_api.proto b/model/job-management/src/main/proto/beam_job_api.proto
index 2ebc1de..e9f0eb9 100644
--- a/model/job-management/src/main/proto/beam_job_api.proto
+++ b/model/job-management/src/main/proto/beam_job_api.proto
@@ -201,6 +201,16 @@ message JobMessagesResponse {
 }
 
 // Enumeration of all JobStates
+//
+// The state transition diagram is:
+//   STOPPED -> STARTING -> RUNNING -> DONE
+//                                  \> FAILED
+//                                  \> CANCELLING -> CANCELLED
+//                                  \> UPDATING -> UPDATED
+//                                  \> DRAINING -> DRAINED
+//
+// Transitions are optional such that a job may go from STOPPED to RUNNING
+// without needing to pass through STARTING.
 message JobState {
   enum Enum {
     UNSPECIFIED = 0;
@@ -214,6 +224,7 @@ message JobState {
     DRAINED = 8;
     STARTING = 9;
     CANCELLING = 10;
+    UPDATING = 11;
   }
 }