mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-08 16:38:04 +00:00
Remove info log and using JsonUtils to convert the Ingestion Pipeline (#14759)
This commit is contained in:
parent
bfbd953b53
commit
70b74d7d4f
@ -273,14 +273,12 @@ public abstract class AbstractEventConsumer
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
// Must Have , Before Execute the Init, Quartz Requires a Non-Arg Constructor
|
||||
this.init(jobExecutionContext);
|
||||
// Poll Events from Change Event Table
|
||||
List<ChangeEvent> batch = pollEvents(offset, 100);
|
||||
int batchSize = batch.size();
|
||||
try {
|
||||
|
||||
this.init(jobExecutionContext);
|
||||
|
||||
// Poll Events from Change Event Table
|
||||
List<ChangeEvent> batch = pollEvents(offset, 100);
|
||||
int batchSize = batch.size();
|
||||
|
||||
// Retry Failed Events
|
||||
Set<FailedEvent> failedEventsList =
|
||||
JsonUtils.convertValue(
|
||||
@ -293,7 +291,9 @@ public abstract class AbstractEventConsumer
|
||||
.toList();
|
||||
batch.addAll(failedChangeEvents);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error in executing the Job : {} ", e.getMessage());
|
||||
} finally {
|
||||
if (!batch.isEmpty()) {
|
||||
// Publish Events
|
||||
alertMetrics.withTotalEvents(alertMetrics.getTotalEvents() + batch.size());
|
||||
@ -303,9 +303,6 @@ public abstract class AbstractEventConsumer
|
||||
offset += batchSize;
|
||||
commit(jobExecutionContext);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error in executing the Job : {} ", e.getMessage());
|
||||
} finally {
|
||||
// Call stop to close the client
|
||||
this.stop();
|
||||
}
|
||||
|
@ -85,6 +85,6 @@ public class EmailPublisher extends AbstractEventConsumer {
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
LOG.info("Email Publisher Stopped");
|
||||
LOG.debug("Email Publisher Stopped");
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,8 @@ public class AlertsRuleEvaluator {
|
||||
}
|
||||
for (FieldChange fieldChange : changeEvent.getChangeDescription().getFieldsUpdated()) {
|
||||
if (fieldChange.getName().equals("pipelineStatus") && fieldChange.getNewValue() != null) {
|
||||
PipelineStatus pipelineStatus = (PipelineStatus) fieldChange.getNewValue();
|
||||
PipelineStatus pipelineStatus =
|
||||
JsonUtils.convertValue(fieldChange.getNewValue(), PipelineStatus.class);
|
||||
PipelineStatusType status = pipelineStatus.getPipelineState();
|
||||
for (String givenStatus : pipelineState) {
|
||||
if (givenStatus.equals(status.value())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user