iPalash commented on code in PR #4096:
URL: https://github.com/apache/gobblin/pull/4096#discussion_r1944482680
##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/joblauncher/GobblinTemporalJobLauncher.java:
##########
@@ -107,13 +111,38 @@ protected Config applyJobLauncherOverrides(Config config)
{
return configOverrides.withFallback(config);
}
+ private String getIssuesSummary() {
+ TextStringBuilder sb = new TextStringBuilder();
+ try {
+ List<Issue> issues = this.getIssueRepository().getAll();
+ sb.appendln("");
+ sb.appendln("vvvvv============= Issues (summary) =============vvvvv");
+
+ for (int i = 0; i < issues.size(); i++) {
+ Issue issue = issues.get(i);
+
+ sb.appendln("%s) %s %s %s | source: %s", i + 1,
issue.getSeverity().toString(), issue.getCode(),
+ issue.getSummary(), issue.getSourceClass());
+ }
+ sb.append("^^^^^=============================================^^^^^");
+ sb.toString();
+ }
+ catch(Exception e) {
+ log.warn("Failed to get issue summary", e);
+ }
+ return sb.toString();
+ }
+
@Override
protected void handleLaunchFinalization() {
// NOTE: This code only makes sense when there is 1 source / workflow
being launched per application for Temporal. This is a stop-gap
// for achieving batch job behavior. Given the current constraints of yarn
applications requiring a static proxy user
// during application creation, it is not possible to have multiple
workflows running in the same application.
// and so it makes sense to just kill the job after this is completed
log.info("Requesting the AM to shutdown after the job {} completed",
this.jobContext.getJobId());
+ JobState jobState = this.jobContext.getJobState();
+ String issuesSummary = this.getIssuesSummary();
+ eventBus.post(new JobFailureEvent(jobState, issuesSummary));
Review Comment:
Renamed to `JobSummaryEvent` & added in both cases
--
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]