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

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

                Author: ASF GitHub Bot
            Created on: 15/Aug/24 19:05
            Start Date: 15/Aug/24 19:05
    Worklog Time Spent: 10m 
      Work Description: arjun4084346 commented on code in PR #4027:
URL: https://github.com/apache/gobblin/pull/4027#discussion_r1718869339


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -164,19 +163,23 @@ public static void 
cancelDagNode(Dag.DagNode<JobExecutionPlan> dagNodeToCancel,
     }
 
     try {
+      if (dagNodeToCancel.getValue().getJobFuture().isPresent()) {
+        Future<?> future = dagNodeToCancel.getValue().getJobFuture().get();
+        String serializedFuture = 
DagManagerUtils.getSpecProducer(dagNodeToCancel).serializeAddSpecResponse(future);
+        props.put(ConfigurationKeys.SPEC_PRODUCER_SERIALIZED_FUTURE, 
serializedFuture);
+      } else {
+        log.warn("No Job future when canceling DAG node - {}", 
dagNodeToCancel.getValue().getJobSpec().getUri());
+      }
       
DagManagerUtils.getSpecProducer(dagNodeToCancel).cancelJob(dagNodeToCancel.getValue().getJobSpec().getUri(),
 props).get();

Review Comment:
   100%





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

    Worklog Id:     (was: 930475)
    Time Spent: 50m  (was: 40m)

> provide job future before calling SpecProducer::cancelJob
> ---------------------------------------------------------
>
>                 Key: GOBBLIN-2133
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2133
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>




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

Reply via email to