Hisoka-X commented on code in PR #7786:
URL: https://github.com/apache/seatunnel/pull/7786#discussion_r1792712034
##########
seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/job/JobDAGInfo.java:
##########
@@ -32,4 +39,35 @@ public class JobDAGInfo implements Serializable {
Long jobId;
Map<Integer, List<Edge>> pipelineEdges;
Map<Long, VertexInfo> vertexInfoMap;
+
+ public JsonObject toJsonObject() {
+ JsonObject pipelineEdgesJsonObject = new JsonObject();
+
+ for (Map.Entry<Integer, List<Edge>> entry : pipelineEdges.entrySet()) {
+ JsonArray jsonArray = new JsonArray();
+ for (Edge edge : entry.getValue()) {
+ JsonObject edgeJsonObject = new JsonObject();
+ edgeJsonObject.add("inputVertexId",
edge.getInputVertexId().toString());
+ edgeJsonObject.add("targetVertexId",
edge.getTargetVertexId().toString());
+ jsonArray.add(edgeJsonObject);
+ }
+ pipelineEdgesJsonObject.add(entry.getKey().toString(), jsonArray);
+ }
+
+ ObjectMapper objectMapper = new ObjectMapper();
Review Comment:
please use static ObjectMapper
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]