[
https://issues.apache.org/jira/browse/GOBBLIN-1387?focusedWorklogId=551058&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-551058
]
ASF GitHub Bot logged work on GOBBLIN-1387:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 10/Feb/21 23:57
Start Date: 10/Feb/21 23:57
Worklog Time Spent: 10m
Work Description: jack-moseley commented on a change in pull request
#3225:
URL: https://github.com/apache/gobblin/pull/3225#discussion_r574170242
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobContext.java
##########
@@ -547,4 +548,21 @@ public String toString() {
return
Objects.toStringHelper(JobContext.class.getSimpleName()).add("jobName",
getJobName())
.add("jobId", getJobId()).add("jobState", getJobState()).toString();
}
+
+ /**
+ * Get all of the failures from the datasetStates stored in the jobContext
to determine if
+ * email notification should be sent or not. Previously job context only
looked at jobStates, where
+ * failures from datasetStates were not propagated from
+ * Failures are tracked using {@link ConfigurationKeys#JOB_FAILURES_KEY}
+ */
+ public int getDatasetStateFailures() {
+ if (!this.datasetStatesByUrns.isPresent()) {
+ return 0;
+ }
Review comment:
You could just use `getDatasetStatesByUrns` from this class, and it will
return an empty map if not present, so this method would still correctly return
0.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 551058)
Time Spent: 0.5h (was: 20m)
> Email Notifications for failures not sending
> --------------------------------------------
>
> Key: GOBBLIN-1387
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1387
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-core
> Affects Versions: 0.16.0
> Reporter: William Lo
> Assignee: Abhishek Tiwari
> Priority: Major
> Fix For: 0.16.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Email notifications look into JOB_FAILURES_KEY, which is set by DatasetState.
> JobContext's reference to it's own jobState is misleading here as it does not
> track dataset state failures (in terms of amounts, only if it is
> passed/failed).
> Add a function to track the dataset state failures from jobContext
--
This message was sent by Atlassian Jira
(v8.3.4#803005)