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

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

                Author: ASF GitHub Bot
            Created on: 08/Jan/24 17:52
            Start Date: 08/Jan/24 17:52
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3853:
URL: https://github.com/apache/gobblin/pull/3853#discussion_r1444999117


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/Dag.java:
##########
@@ -255,10 +261,14 @@ public static class DagNode<T> {
     private T value;
     //List of parent Nodes that are dependencies of this Node.
     private List<DagNode<T>> parentNodes;
+    private String id;
 
     //Constructor
     public DagNode(T value) {
       this.value = value;
+      if (this.getValue() instanceof JobExecutionPlan) {
+        this.id = createId(((JobExecutionPlan) 
this.getValue()).getJobSpec().getConfig());
+      }

Review Comment:
   looks like you're allowing this to default to `null`-initialized when not 
`instanceof JobExecutionPlan`.
   
   given that is not even this instance's type, but that of the generic param 
it encloses, it suggests this not to be essential to the abstraction.  as such 
it wouldn't belong as a field (property) of class instances.
   
   alternatively it might live self-contained, calculated each time within a 
`static` (e.g. in `DagManagerUtils`):
   ```
   public static Optional<String> extractJobId(DagNode<T>)
   ```
   
   less good might be in a stand-alone accessor (not burying conditional code 
within the ctor):
   ```
   public Optional<String> getJobId()
   ```





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

    Worklog Id:     (was: 898508)
    Time Spent: 15h 20m  (was: 15h 10m)

> Refactor code to move current in-memory references to new design for REST 
> calls: Launch, Resume and Kill
> --------------------------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1910
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1910
>             Project: Apache Gobblin
>          Issue Type: New Feature
>            Reporter: Meeth Gala
>            Priority: Major
>          Time Spent: 15h 20m
>  Remaining Estimate: 0h
>




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

Reply via email to