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

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

                Author: ASF GitHub Bot
            Created on: 30/Sep/21 23:12
            Start Date: 30/Sep/21 23:12
    Worklog Time Spent: 10m 
      Work Description: 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]


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

    Worklog Id:     (was: 658653)
    Time Spent: 2h 10m  (was: 2h)

> Integrate with Helix API to add/remove task from a running helix job
> --------------------------------------------------------------------
>
>                 Key: GOBBLIN-1542
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1542
>             Project: Apache Gobblin
>          Issue Type: New Feature
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Integrate with Helix API to add/remove task from a running helix job. This 
> ticket also contains the API change that Source need to contact with 
> JobLauncher to notify that there is some change in workunit. This will enable 
> us to dynamically add/delete task from running job and save resources. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to