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



##########
File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java
##########
@@ -259,6 +265,27 @@ public static void setDefaultAuthenticator(Properties 
properties) {
     }
   }
 
+  /**
+   * Handle {@link WorkUnitChangeEvent}, by default it will do nothing
+   */
+  @Subscribe
+  public void handleWorkUnitChangeEvent(WorkUnitChangeEvent 
workUnitChangeEvent)
+      throws InvocationTargetException {
+    LOG.info("start to handle workunit change event");
+    try {
+      this.removeTasksFromCurrentJob(workUnitChangeEvent.getOldTaskIds());
+      this.addTasksToCurrentJob(workUnitChangeEvent.getNewWorkUnits());
+    } catch (Exception e) {

Review comment:
       you may want to distinguish different type of exception and log them 
accordingly especially for things like retry failure. 




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