[
https://issues.apache.org/jira/browse/GOBBLIN-2074?focusedWorklogId=921360&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-921360
]
ASF GitHub Bot logged work on GOBBLIN-2074:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/May/24 08:47
Start Date: 30/May/24 08:47
Worklog Time Spent: 10m
Work Description: 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 declare, but that seems
to have been an oversight...
in the bigger picture, 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 any such internal exception (which you might log)
Issue Time Tracking
-------------------
Worklog Id: (was: 921360)
Time Spent: 50m (was: 40m)
> move DagActionStore from gobblin-runtime to gobblin-service
> -----------------------------------------------------------
>
> Key: GOBBLIN-2074
> URL: https://issues.apache.org/jira/browse/GOBBLIN-2074
> Project: Apache Gobblin
> Issue Type: Task
> Reporter: Arjun Singh Bora
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)