ZihanLi58 commented on a change in pull request #3393:
URL: https://github.com/apache/gobblin/pull/3393#discussion_r719834698



##########
File path: 
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/HelixUtils.java
##########
@@ -145,6 +146,31 @@ static void waitJobInitialization(
     log.info("Work flow {} initialized", workFlowName);
   }
 
+  public static boolean deleteTaskFromHelixJob(String workFlowName,
+      String jobName, String taskID, TaskDriver helixTaskDriver) {
+    try {
+      log.info(String.format("try to delete task %s from workflow %s, job %s", 
taskID, workFlowName, jobName));
+      helixTaskDriver.deleteTask(workFlowName, jobName, taskID);
+    } catch (Exception e) {
+      e.printStackTrace();
+    }
+    return 
!helixTaskDriver.getJobConfig(TaskUtil.getNamespacedJobName(workFlowName, 
jobName)).getMapConfigs().containsKey(taskID);

Review comment:
       oh that's a good question, I haven't check that part, just follow the 
instruction on the doc that when error happens it's caller's responsibility to 
check whether the update successful. Let me only add this part when exception 
happens to not rely on the read/write consistency in normal case




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