[
https://issues.apache.org/jira/browse/GOBBLIN-808?focusedWorklogId=266143&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-266143
]
ASF GitHub Bot logged work on GOBBLIN-808:
------------------------------------------
Author: ASF GitHub Bot
Created on: 24/Jun/19 21:49
Start Date: 24/Jun/19 21:49
Worklog Time Spent: 10m
Work Description: sv2000 commented on pull request #2674: [GOBBLIN-808]
implement azkaban flow cancel when dag manager is enabled
URL: https://github.com/apache/incubator-gobblin/pull/2674#discussion_r296930098
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
##########
@@ -294,10 +335,30 @@ public synchronized void setActive(boolean active) {
@Override
public void run() {
try {
- Object nextItem = queue.poll();
+ String nextDagToCancel = cancelQueue.poll();
+ //Poll the cancelQueue for a new Dag to cancel.
+ if (nextDagToCancel != null) {
+ log.info("Cancel flow with DagId {}", nextDagToCancel);
+ if (this.dagToJobs.containsKey(nextDagToCancel)) {
+ List<DagNode<JobExecutionPlan>> dagNodesToCancel =
this.dagToJobs.get(nextDagToCancel);
+ log.info("Found {} DagNodes to cancel.", dagNodesToCancel.size());
+ for (DagNode<JobExecutionPlan> dagNodeToCancel : dagNodesToCancel)
{
+ Properties props = new Properties();
+ if (dagNodeToCancel.getValue().getAzkabanExecId().isPresent()) {
+ String azkabanExecId =
dagNodeToCancel.getValue().getAzkabanExecId().get().getExecId();
+ props.put(ConfigurationKeys.AZKABAN_EXEC_ID, azkabanExecId);
+ log.info("Cancel job with azkaban exec id {}.", azkabanExecId);
+ }
+
DagManagerUtils.getSpecProducer(dagNodeToCancel).deleteSpec(null, props);
Review comment:
Another suggestion to consider: Should we add a deleteSpec(CompletableFuture
future) method to SpecProducer interface? or alternately, provide a separate
cancelSpec(CompletableFuture future) method? Either way, seems like the
SpecProducer implementation should not be exposed inside the DagManager class.
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 266143)
Time Spent: 3h 10m (was: 3h)
> implement azkaban job cancellation in Gobblin Service
> -----------------------------------------------------
>
> Key: GOBBLIN-808
> URL: https://issues.apache.org/jira/browse/GOBBLIN-808
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Arjun Singh Bora
> Priority: Major
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)