davidradl commented on code in PR #25798:
URL: https://github.com/apache/flink/pull/25798#discussion_r1890465994


##########
flink-runtime/src/test/java/org/apache/flink/runtime/jobgraph/jsonplan/StreamGraphJsonSchema.java:
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.jobgraph.jsonplan;
+
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+import java.util.Objects;
+
+public class StreamGraphJsonSchema {
+    public static final String FIELD_NAME_NODES = "nodes";
+
+    @JsonProperty(FIELD_NAME_NODES)
+    private List<JsonStreamNodeSchema> nodes;
+
+    @JsonCreator
+    public StreamGraphJsonSchema(@JsonProperty(FIELD_NAME_NODES) 
List<JsonStreamNodeSchema> nodes) {
+        this.nodes = nodes;
+    }
+
+    @JsonIgnore
+    public List<JsonStreamNodeSchema> getNodes() {
+        return nodes;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        StreamGraphJsonSchema that = (StreamGraphJsonSchema) o;
+        return Objects.equals(nodes, that.nodes);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(nodes);
+    }
+
+    public static class JsonStreamNodeSchema {
+        public static final String FIELD_NAME_NODE_ID = "id";
+        public static final String FIELD_NAME_NODE_PARALLELISM = "parallelism";
+        public static final String FIELD_NAME_NODE_OPERATOR = "operator";
+        public static final String FIELD_NAME_NODE_DESCRIPTION = "description";

Review Comment:
   A version would be helpful - in case we need to change this structure 



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to