Skip to content

Commit

Permalink
update get method
Browse files Browse the repository at this point in the history
  • Loading branch information
alovew committed Sep 14, 2022
1 parent bd7fab1 commit 9345169
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,16 @@ private static RecordMapper<Record, SyncStats> getSyncStatsRecordMapper() {
}

private static RecordMapper<Record, NormalizationSummary> getNormalizationSummaryRecordMapper() {
return record -> {
final RecordMapper<Record, NormalizationSummary> recordMapper = record -> {
try {
new NormalizationSummary().withStartTime(record.get(NORMALIZATION_SUMMARIES.START_TIME).toInstant().toEpochMilli())
.withEndTime(record.get(NORMALIZATION_SUMMARIES.END_TIME).toInstant().toEpochMilli())
.withFailures(record.get(NORMALIZATION_SUMMARIES.FAILURES, String.class) == null ? null : deserializeFailureReasons(record));
return new NormalizationSummary().withStartTime(record.get(NORMALIZATION_SUMMARIES.START_TIME).toInstant().toEpochMilli())
.withEndTime(record.get(NORMALIZATION_SUMMARIES.END_TIME).toInstant().toEpochMilli())
.withFailures(record.get(NORMALIZATION_SUMMARIES.FAILURES, String.class) == null ? null : deserializeFailureReasons(record));
} catch (final JsonProcessingException e) {
throw new RuntimeException(e);
}
return null;
};
return recordMapper;
}

private static List<FailureReason> deserializeFailureReasons(final Record record) throws JsonProcessingException {
Expand Down

0 comments on commit 9345169

Please sign in to comment.