arjun4084346 commented on code in PR #3954:
URL: https://github.com/apache/gobblin/pull/3954#discussion_r1619208154


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagementStateStore.java:
##########
@@ -201,4 +196,77 @@ default void deleteFailedDag(Dag<JobExecutionPlan> dag) 
throws IOException {
    * has any running job, false otherwise.
    */
   public boolean hasRunningJobs(DagManager.DagId dagId);
+
+  /**
+   * Check if an action exists in dagAction store by flow group, flow name, 
flow execution id, and job name.
+   * @param flowGroup flow group for the dag action
+   * @param flowName flow name for the dag action
+   * @param flowExecutionId flow execution for the dag action
+   * @param jobName job name for the dag action
+   * @param dagActionType the value of the dag action
+   * @throws IOException
+   */
+  boolean existsJobDagAction(String flowGroup, String flowName, String 
flowExecutionId, String jobName,
+      DagActionStore.DagActionType dagActionType) throws IOException, 
SQLException;
+
+  /**
+   * Check if an action exists in dagAction store by flow group, flow name, 
and flow execution id, it assumes jobName is
+   * empty ("").
+   * @param flowGroup flow group for the dag action
+   * @param flowName flow name for the dag action
+   * @param flowExecutionId flow execution for the dag action
+   * @param dagActionType the value of the dag action
+   * @throws IOException
+   */
+  boolean existsFlowDagAction(String flowGroup, String flowName, String 
flowExecutionId,
+      DagActionStore.DagActionType dagActionType) throws IOException, 
SQLException;
+
+  /** Persist the {@link DagActionStore.DagAction} in {@link DagActionStore} 
for durability */
+  default void addDagAction(DagActionStore.DagAction dagAction) throws 
IOException {
+    addJobDagAction(
+        dagAction.getFlowGroup(),
+        dagAction.getFlowName(),
+        dagAction.getFlowExecutionId(),
+        dagAction.getJobName(),
+        dagAction.getDagActionType());
+  }
+
+  /**
+   * Persist the dag action in {@link DagActionStore} for durability
+   * @param flowGroup flow group for the dag action
+   * @param flowName flow name for the dag action
+   * @param flowExecutionId flow execution for the dag action
+   * @param jobName job name for the dag action
+   * @param dagActionType the value of the dag action
+   * @throws IOException
+   */
+  void addJobDagAction(String flowGroup, String flowName, String 
flowExecutionId, String jobName,
+      DagActionStore.DagActionType dagActionType) throws IOException;

Review Comment:
   there is an implementation in line 285. It would give compile time error if 
implementation is not provided. also i rename exists() to existsJobDagAction() 
and existsFlowDagAction()



-- 
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]

Reply via email to