phet commented on code in PR #3896:
URL: https://github.com/apache/gobblin/pull/3896#discussion_r1538176933


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/LaunchDagProc.java:
##########
@@ -70,16 +53,16 @@ public class LaunchDagProc extends 
DagProc<Optional<Dag<JobExecutionPlan>>, Opti
         
metricContext.newContextAwareGauge(ServiceMetricNames.FLOW_ORCHESTRATION_DELAY, 
orchestrationDelayCounter::get));
   }
 
-  @Override
-  protected DagManager.DagId getDagId() {
-    return this.launchDagTask.getDagId();
+  public LaunchDagProc(LaunchDagTask dagTask, FlowCompilationValidationHelper 
flowCompilationValidationHelper) {
+    this.dagTask = dagTask;
+    this.flowCompilationValidationHelper = flowCompilationValidationHelper;
   }
 
   @Override
   protected Optional<Dag<JobExecutionPlan>> initialize(DagManagementStateStore 
dagManagementStateStore)
       throws IOException {
     try {
-      DagActionStore.DagAction dagAction = this.launchDagTask.getDagAction();
+      DagActionStore.DagAction dagAction = this.dagTask.getDagAction();

Review Comment:
   pulling out the `DagAction` breaks encapsulation and seems best avoided.  
could we rework to add a method `DagId::getFlowId` (to `DagId`)?
   
   then, all we need is `DagProc::getDagId`:
   ```
   DagId dagId = this.getDagId();
   FlowSpec flowSpec = loadFlowSpec(dmss, dagId);
   flowSpec.addProperty(..., dagId.getFlowExecutionId());
   ```



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

Reply via email to