homatthew commented on code in PR #3900:
URL: https://github.com/apache/gobblin/pull/3900#discussion_r1535938998


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/activity/impl/CommitActivityImpl.java:
##########
@@ -135,9 +141,21 @@ public Callable<Void> apply(final Map.Entry<String, 
JobState.DatasetState> entry
 
       IteratorExecutor.logFailures(result, null, 10);
 
+      Set<String> failedDatasetUrns = new HashSet<>();
+      for (JobState.DatasetState datasetState : datasetStatesByUrns.values()) {
+        // Set the overall job state to FAILED if the job failed to process 
any dataset
+        if (datasetState.getState() == JobState.RunningState.FAILED) {
+          failedDatasetUrns.add(datasetState.getDatasetUrn());
+        }
+      }
+      if (!failedDatasetUrns.isEmpty()) {
+        String allFailedDatasets = String.join(", ", failedDatasetUrns);
+        log.error("Failed to commit dataset state for dataset(s) {}" + 
String.join(", ", failedDatasetUrns));

Review Comment:
   I think you meant to use the variable from 152 here



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