Repository: oozie Updated Branches: refs/heads/branch-4.1 3a93f8435 -> f42a7d534
OOZIE-2026 fix synchronization in SLACalculatorMemory.addJobStatus to avoid duplicated SLA message (ryota) Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/f42a7d53 Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/f42a7d53 Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/f42a7d53 Branch: refs/heads/branch-4.1 Commit: f42a7d5348dda73383b7d217eed230987dacc35c Parents: 3a93f84 Author: egashira <[email protected]> Authored: Fri Oct 10 02:39:55 2014 -0700 Committer: egashira <[email protected]> Committed: Fri Oct 10 02:39:55 2014 -0700 ---------------------------------------------------------------------- .../java/org/apache/oozie/sla/SLACalculatorMemory.java | 12 ++++++------ release-log.txt | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/f42a7d53/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java b/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java index a96e55d..8481303 100644 --- a/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java +++ b/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java @@ -727,6 +727,9 @@ public class SLACalculatorMemory implements SLACalculator { } slaInfo.setEventProcessed(8); historySet.remove(jobId); + slaInfo.setLastModifiedTime(new Date()); + SLASummaryQueryExecutor.getInstance().executeUpdate( + SLASummaryQuery.UPDATE_SLA_SUMMARY_FOR_STATUS_ACTUAL_TIMES, slaInfo); hasSla = true; } else if (Services.get().get(JobsConcurrencyService.class).isHighlyAvailableMode()) { @@ -772,11 +775,13 @@ public class SLACalculatorMemory implements SLACalculator { LOG.debug("Unknown Job Status for SLA purpose[{0}]", jobEventStatus); slaInfo = getSLASummaryBean(slaCalc); } - if (slaCalc.getEventProcessed() == 7) { slaInfo.setEventProcessed(8); slaMap.remove(jobId); } + slaInfo.setLastModifiedTime(new Date()); + SLASummaryQueryExecutor.getInstance().executeUpdate( + SLASummaryQuery.UPDATE_SLA_SUMMARY_FOR_STATUS_ACTUAL_TIMES, slaInfo); hasSla = true; } } @@ -790,11 +795,6 @@ public class SLACalculatorMemory implements SLACalculator { LOG.trace("SLA Status Event - Job:" + jobId + " Status:" + slaCalc.getSLAStatus()); } - if (hasSla) { - slaInfo.setLastModifiedTime(new Date()); - SLASummaryQueryExecutor.getInstance().executeUpdate( - SLASummaryQuery.UPDATE_SLA_SUMMARY_FOR_STATUS_ACTUAL_TIMES, slaInfo); - } return hasSla; } http://git-wip-us.apache.org/repos/asf/oozie/blob/f42a7d53/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index f6684f8..7ef9c3b 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 4.1.0 release (4.1 - unreleased) +OOZIE-2026 fix synchronization in SLACalculatorMemory.addJobStatus to avoid duplicated SLA message (ryota) OOZIE-2017 On startup, StatusTransitService can transition Coordinators that were in PREPSUSPENDED to RUNNING (rkanter) OOZIE-2023 Job rerun can stuck in prep (puru) OOZIE-1932 Services should load CallableQueueService after MemoryLocksService (mona)
