Skip to content

Commit 20ccf5c

Browse files
NamsB7Will-Lo
authored andcommitted
Insert Final summary issue entry in issues table (#4125)
1 parent c51be6c commit 20ccf5c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

gobblin-metastore/src/main/java/org/apache/gobblin/metastore/MysqlErrorPatternStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*
5151
* Expected table schemas:
5252
*
53-
* 1. error_summary_regex_store
53+
* 1. error_regex_summary_store
5454
* - description_regex: VARCHAR(255) NOT NULL UNIQUE
5555
* - error_category_name: VARCHAR(255) NOT NULL
5656
*
@@ -127,7 +127,7 @@ public MysqlErrorPatternStore(Config config)
127127
throw new IOException("Please specify the config for MysqlErrorPatternStore");
128128
}
129129
this.errorRegexSummaryStoreTable =
130-
ConfigUtils.getString(config, ConfigurationKeys.ERROR_REGEX_DB_TABLE_KEY, "error_summary_regex_store");
130+
ConfigUtils.getString(config, ConfigurationKeys.ERROR_REGEX_DB_TABLE_KEY, "error_regex_summary_store");
131131
this.errorCategoriesTable =
132132
ConfigUtils.getString(config, ConfigurationKeys.ERROR_CATEGORIES_DB_TABLE_KEY, "error_categories");
133133
this.dataSource = MysqlDataSourceFactory.get(config, SharedResourcesBrokerFactory.getImplicitBroker());

gobblin-runtime/src/main/java/org/apache/gobblin/runtime/troubleshooter/JobIssueEventHandler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ public List<Issue> getErrorListForClassification(String contextId)
129129
return issueRepository.getMostRecentErrors(contextId, limit);
130130
}
131131

132-
public void logFinalError(Issue issue, String flowName, String flowGroup, String flowExecutionId, String jobName) {
132+
public void logFinalError(Issue issue, String flowName, String flowGroup, String flowExecutionId, String jobName)
133+
throws TroubleshooterException {
133134
JobIssueLogEntry logEntry = new JobIssueLogEntry();
134135
logEntry.issue = issue;
135136
logEntry.flowName = flowName;
@@ -138,6 +139,8 @@ public void logFinalError(Issue issue, String flowName, String flowGroup, String
138139
logEntry.jobName = jobName;
139140

140141
String serializedIssueEvent = GsonUtils.GSON_WITH_DATE_HANDLING.toJson(logEntry);
142+
String contextId = TroubleshooterUtils.getContextIdForJob(flowGroup, flowName, flowExecutionId, jobName);
143+
issueRepository.put(contextId, issue);
141144
issueLogger.info(serializedIssueEvent);
142145
}
143146
}

0 commit comments

Comments
 (0)