[ 
https://issues.apache.org/jira/browse/GOBBLIN-2022?focusedWorklogId=911482&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-911482
 ]

ASF GitHub Bot logged work on GOBBLIN-2022:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Mar/24 06:16
            Start Date: 26/Mar/24 06:16
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3896:
URL: https://github.com/apache/gobblin/pull/3896#discussion_r1538518739


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/task/DagTask.java:
##########
@@ -42,11 +43,14 @@ public abstract class DagTask {
   @Getter public final DagActionStore.DagAction dagAction;
   private final MultiActiveLeaseArbiter.LeaseObtainedStatus 
leaseObtainedStatus;
   @Getter protected final DagManager.DagId dagId;
+  @Getter protected final DagNodeId dagNodeId;
 
   public DagTask(DagActionStore.DagAction dagAction, 
MultiActiveLeaseArbiter.LeaseObtainedStatus leaseObtainedStatus) {
     this.dagAction = dagAction;
     this.leaseObtainedStatus = leaseObtainedStatus;
     this.dagId = DagManagerUtils.generateDagId(dagAction.getFlowGroup(), 
dagAction.getFlowName(), dagAction.getFlowExecutionId());
+    this.dagNodeId = new DagNodeId(dagAction.getFlowGroup(), 
dagAction.getFlowName(),
+        Long.parseLong(dagAction.getFlowExecutionId()), 
dagAction.getFlowGroup(), dagAction.getJobName());

Review Comment:
   the reason I encouraged you to add a method `DagAction::getDagNodeId` is 
that every one of these params came from the same `dagAction`.  hence, the 
"conversion" belongs either in that class or as a `static` in `DagNodeId`:
   ```
   public static DagNodeId fromDagAction(DagAction dagAction) { ... }
   ```
   
   I'd lean toward inside `DagAction`, as I'm more comfortable having that know 
about `DagNodeId` than I am adding a reference to `DagAction` inside a simple 
`@Data`-style POJO





Issue Time Tracking
-------------------

    Worklog Id:     (was: 911482)
    Time Spent: 3h 20m  (was: 3h 10m)

> create dag proc for taking actions on job completion
> ----------------------------------------------------
>
>                 Key: GOBBLIN-2022
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2022
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to