codenohup commented on code in PR #45:
URL: https://github.com/apache/flink-agents/pull/45#discussion_r2173166776
##########
plan/src/main/java/org/apache/flink/agents/plan/WorkflowPlan.java:
##########
@@ -19,23 +19,33 @@
package org.apache.flink.agents.plan;
import org.apache.flink.agents.api.Event;
+import org.apache.flink.agents.plan.serializer.WorkflowPlanJsonDeserializer;
+import org.apache.flink.agents.plan.serializer.WorkflowPlanJsonSerializer;
+import
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.List;
import java.util.Map;
/** Workflow plan compiled from user defined workflow. */
+@JsonSerialize(using = WorkflowPlanJsonSerializer.class)
+@JsonDeserialize(using = WorkflowPlanJsonDeserializer.class)
public class WorkflowPlan {
- private final Map<Class<? extends Event>, List<Action>> actions;
+ private final Map<String, Action> actions;
+ private final Map<Class<? extends Event>, List<Action>>
eventTriggerActions;
Review Comment:
Hi, @PatrickRen
I suggest using _Map<String, List<Action>>_ type to store
_eventTriggerActions_, where the key is the unique identifier of the event
(e.g., the fully qualified class name).
As @wenjin272 mentioned, there are two main issues:
1. Python events have no corresponding class in Java.
2. Even if we use a _PythonEvent_ wrapper class for Python events, like #43.
It would still be difficult to find actions interested in specific events.
--
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]