phet commented on code in PR #3912:
URL: https://github.com/apache/gobblin/pull/3912#discussion_r1599172058


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/ProcessWorkUnitsWorkflowImpl.java:
##########
@@ -64,14 +66,14 @@ private int performWork(WUProcessingSpec workSpec) {
     );
     if (workunitsProcessed > 0) {
       CommitStepWorkflow commitWorkflow = createCommitStepWorkflow();
-      int result = commitWorkflow.commit(workSpec);
-      if (result == 0) {
+      CommitGobblinStats result = commitWorkflow.commit(workSpec);
+      if (result.getNumCommittedWorkUnits() == 0) {
         log.warn("No work units committed at the job level. They could have 
been committed at the task level.");
       }
       return result;
     } else {
       log.error("No work units processed, so no commit attempted.");
-      return 0;
+      return new CommitGobblinStats(new HashMap<>(), 0);

Review Comment:
   did I see this earlier as well?  I'd probably encapsulate within a static, 
for use as:
   ```
   return CommitStats.createEmpty();
   ```



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