autumnust 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_r302778273
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
##########
@@ -317,6 +394,30 @@ public void run() {
}
}
+ private void cancelDag(String dagToCancel) throws ExecutionException,
InterruptedException {
+ log.info("Cancel flow with DagId {}", dagToCancel);
+ if (this.dagToJobs.containsKey(dagToCancel)) {
+ List<DagNode<JobExecutionPlan>> dagNodesToCancel =
this.dagToJobs.get(dagToCancel);
+ log.info("Found {} DagNodes to cancel.", dagNodesToCancel.size());
+ for (DagNode<JobExecutionPlan> dagNodeToCancel : dagNodesToCancel) {
+ Properties props = new Properties();
+ if (dagNodeToCancel.getValue().getJobFuture().isPresent()) {
+ Future future = dagNodeToCancel.getValue().getJobFuture().get();
+ if (future instanceof CompletableFuture &&
+ future.get() instanceof AzkabanExecuteFlowStatus.ExecuteId) {
+ CompletableFuture<AzkabanExecuteFlowStatus.ExecuteId>
completableFuture = (CompletableFuture) future;
+ String azkabanExecId = completableFuture.get().getExecId();
+ props.put(ConfigurationKeys.AZKABAN_EXEC_ID, azkabanExecId);
Review comment:
More like a question: Where is this `AZKABAN_EXEC_ID` being used?
----------------------------------------------------------------
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