sv2000 commented on a change in pull request #2674: [GOBBLIN-808] implement
azkaban flow cancel when dag manager is enabled
URL: https://github.com/apache/incubator-gobblin/pull/2674#discussion_r296929416
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
##########
@@ -470,7 +531,18 @@ private void submitJob(DagNode<JobExecutionPlan> dagNode)
{
// The SpecProducer implementations submit the job to the underlying
executor and return when the submission is complete,
// either successfully or unsuccessfully. To catch any exceptions in
the job submission, the DagManagerThread
// blocks (by calling Future#get()) until the submission is completed.
- producer.addSpec(jobSpec).get();
+ Future addSpecFuture = producer.addSpec(jobSpec);
+
+ if (addSpecFuture instanceof CompletableFuture
+ && addSpecFuture.get() instanceof
AzkabanExecuteFlowStatus.ExecuteId) {
+ CompletableFuture future = (CompletableFuture) addSpecFuture;
+ if (future.get() instanceof AzkabanExecuteFlowStatus.ExecuteId) {
+ AzkabanExecuteFlowStatus.ExecuteId azkabanExecId =
(AzkabanExecuteFlowStatus.ExecuteId) future.get();
+ dagNode.getValue().setAzkabanExecId(Optional.of(azkabanExecId));
Review comment:
See comment in JobExecutionPlan about using CompletableFuture instead of
azkabanExecId.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services