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