phet commented on code in PR #3954:
URL: https://github.com/apache/gobblin/pull/3954#discussion_r1619514553
##########
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;
Review Comment:
looks like these also check based on `dagActionType`, yet javadoc doesn't
say that.
also, the interface probably shouldn't name `SQLException`, but rather
something more semantic or at least less implementation-specific (such as
`IOException`). I get that's what `DagActionStore` may do, but it may have
been an oversight...
that said, what do you expect the caller to do w/ `SQLException`? is it an
invitation to retry the call? the other alternative, which would make for a
simpler method signature, would be to return `false` upon an internal exception.
--
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]