You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/11/11 13:06:12 UTC

[GitHub] [flink] zentol commented on a diff in pull request #21300: [FLINK-29423][rest] Remove custom JobDetails serializer

zentol commented on code in PR #21300:
URL: https://github.com/apache/flink/pull/21300#discussion_r1020202889


##########
docs/layouts/shortcodes/generated/rest_v1_dispatcher.html:
##########
@@ -1084,7 +1084,38 @@
     "jobs" : {
       "type" : "array",
       "items" : {
-        "type" : "any"
+        "type" : "object",
+        "id" : "urn:jsonschema:org:apache:flink:runtime:messages:webmonitor:JobDetails",
+        "properties" : {
+          "duration" : {
+            "type" : "integer"
+          },
+          "end-time" : {
+            "type" : "integer"
+          },
+          "jid" : {
+            "type" : "any"
+          },
+          "last-modification" : {
+            "type" : "integer"
+          },
+          "name" : {
+            "type" : "string"
+          },
+          "start-time" : {
+            "type" : "integer"
+          },
+          "state" : {
+            "type" : "string",
+            "enum" : [ "INITIALIZING", "CREATED", "RUNNING", "FAILING", "FAILED", "CANCELLING", "CANCELED", "FINISHED", "RESTARTING", "SUSPENDED", "RECONCILING" ]
+          },
+          "tasks" : {
+            "type" : "object",
+            "additionalProperties" : {
+              "type" : "integer"
+            }
+          }

Review Comment:
   This is a bit of a short-cut, but the alternative would be hard-code a class with a field for each execution state (+ 1 additional field to the total count.
   This is how the field looks like in practice:
   ```
   {
   "total":3,
   "created":0,
   "scheduled":0,
   "deploying":0,
   "running":0,
   "finished":3,
   "canceling":0,
   "canceled":0,
   "failed":0,
   "reconciling":0,
   "initializing":0
   }
   ```



##########
docs/static/generated/rest_v1_dispatcher.yml:
##########
@@ -1886,18 +1886,6 @@ components:
         total:
           type: integer
           format: int64
-    CurrentAttempts:

Review Comment:
   This never should've been documented.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org