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


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java:
##########
@@ -271,14 +275,25 @@ public void orchestrate(Spec spec, Properties jobProps, 
long triggerTimestampMil
     Instrumented.updateTimer(this.flowOrchestrationTimer, System.nanoTime() - 
startTime, TimeUnit.NANOSECONDS);
   }
 
-  public void submitFlowToDagManager(FlowSpec flowSpec) throws IOException, 
InterruptedException {
-    Optional<Dag<JobExecutionPlan>> optionalJobExecutionPlanDag =
-        
this.flowCompilationValidationHelper.createExecutionPlanIfValid(flowSpec);
-    if (optionalJobExecutionPlanDag.isPresent()) {
-      submitFlowToDagManager(flowSpec, optionalJobExecutionPlanDag.get());
-    } else {
-      _log.warn("Flow: {} submitted to dagManager failed to compile and 
produce a job execution plan dag", flowSpec);
-      Instrumented.markMeter(this.flowOrchestrationFailedMeter);
+  /**
+   * Method that accepts a flowSpec that it compiles before forwarding to the 
DagManagerfor execution. It's meant to be
+   * called by {@link 
org.apache.gobblin.service.monitoring.DagActionStoreChangeMonitor}
+   * @param flowSpec
+   * @throws IOException
+   * @throws InterruptedException

Review Comment:
   suggest to simplify to:
   ```
      * Compiles the provided {@link FlowSpec} into a {@link 
Dag<JobExecutionPlan>} it forwards to the {@link DagManager} for execution. 
It's meant to be
      * called by {@link 
org.apache.gobblin.service.monitoring.DagActionStoreChangeMonitor}
   ```



##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java:
##########
@@ -259,8 +261,10 @@ public void orchestrate(Spec spec, Properties jobProps, 
long triggerTimestampMil
           // Depending on if DagManager is present, handle execution
           submitFlowToDagManager(flowSpec, compiledDag);
         } finally {
-          // remove from the flow catalog, regardless of whether the flow was 
successfully validated and permitted to exec (concurrently)
-          this.dagManager.removeFlowSpecIfAdhoc(flowSpec);
+        /* Remove adhoc flow spec from the flow catalog, regardless of whether 
the flow was successfully validated
+        and permitted to exec (concurrently)
+         */
+        this.dagManager.removeFlowSpecIfAdhoc(flowSpec);

Review Comment:
   indentation looks off, since it lines up w/ the closing `}` that follows



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