[17/50] [abbrv] oozie git commit: OOZIE-2672 SLA periodic update does not remove job from map if job is removed from database

2016-10-10 Thread gezapeti
OOZIE-2672 SLA periodic update does not remove job from map if job is removed 
from database


Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/bcd23e18
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/bcd23e18
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/bcd23e18

Branch: refs/heads/oya
Commit: bcd23e18e5cf5757a8d5e365ef95f4a80bda
Parents: 3ad3537
Author: Purshotam Shah 
Authored: Tue Sep 20 09:49:35 2016 -0700
Committer: Purshotam Shah 
Committed: Tue Sep 20 09:49:35 2016 -0700

--
 .../java/org/apache/oozie/sla/SLACalculatorMemory.java | 13 -
 release-log.txt|  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/oozie/blob/bcd23e18/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 e8638a9..3522ffe 100644
--- a/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
+++ b/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
@@ -237,8 +237,19 @@ public class SLACalculatorMemory implements SLACalculator {
 }
 synchronized (slaCalc) {
 // get eventProcessed on DB for validation in HA
-SLASummaryBean summaryBean = ((SLASummaryQueryExecutor) 
SLASummaryQueryExecutor.getInstance()).get(
+SLASummaryBean summaryBean = null;
+try {
+summaryBean = ((SLASummaryQueryExecutor) 
SLASummaryQueryExecutor.getInstance()).get(
 
SLASummaryQuery.GET_SLA_SUMMARY_EVENTPROCESSED_LAST_MODIFIED, jobId);
+}
+catch (JPAExecutorException e) {
+if (e.getErrorCode().equals(ErrorCode.E0604) || 
e.getErrorCode().equals(ErrorCode.E0605)) {
+LOG.debug("job [{0}] is is not in DB, removing from 
Memory", jobId);
+slaMap.remove(jobId);
+return;
+}
+throw e;
+}
 byte eventProc = summaryBean.getEventProcessed();
 slaCalc.setEventProcessed(eventProc);
 if (eventProc >= 7) {

http://git-wip-us.apache.org/repos/asf/oozie/blob/bcd23e18/release-log.txt
--
diff --git a/release-log.txt b/release-log.txt
index 515521c..cef8876 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.3.0 release (trunk - unreleased)
 
+OOZIE-2672 SLA periodic update does not remove job from map if job is removed 
from database (satishsaley via puru)
 OOZIE-2498 Oozie CallerId configuration for downstream components 
(abhishekbafna via rohini)
 OOZIE-2491 oozie acl cannot specify group,it does`t work (abhishekbafna via 
rohini)
 OOZIE-2569 Adding yarn-site, core-site, hdfs-site and mapred-site into spark 
launcher (abhishekbafna via rohini)



oozie git commit: OOZIE-2672 SLA periodic update does not remove job from map if job is removed from database

2016-09-20 Thread puru
Repository: oozie
Updated Branches:
  refs/heads/master 3ad35372e -> bcd23e18e


OOZIE-2672 SLA periodic update does not remove job from map if job is removed 
from database


Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/bcd23e18
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/bcd23e18
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/bcd23e18

Branch: refs/heads/master
Commit: bcd23e18e5cf5757a8d5e365ef95f4a80bda
Parents: 3ad3537
Author: Purshotam Shah 
Authored: Tue Sep 20 09:49:35 2016 -0700
Committer: Purshotam Shah 
Committed: Tue Sep 20 09:49:35 2016 -0700

--
 .../java/org/apache/oozie/sla/SLACalculatorMemory.java | 13 -
 release-log.txt|  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/oozie/blob/bcd23e18/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 e8638a9..3522ffe 100644
--- a/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
+++ b/core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
@@ -237,8 +237,19 @@ public class SLACalculatorMemory implements SLACalculator {
 }
 synchronized (slaCalc) {
 // get eventProcessed on DB for validation in HA
-SLASummaryBean summaryBean = ((SLASummaryQueryExecutor) 
SLASummaryQueryExecutor.getInstance()).get(
+SLASummaryBean summaryBean = null;
+try {
+summaryBean = ((SLASummaryQueryExecutor) 
SLASummaryQueryExecutor.getInstance()).get(
 
SLASummaryQuery.GET_SLA_SUMMARY_EVENTPROCESSED_LAST_MODIFIED, jobId);
+}
+catch (JPAExecutorException e) {
+if (e.getErrorCode().equals(ErrorCode.E0604) || 
e.getErrorCode().equals(ErrorCode.E0605)) {
+LOG.debug("job [{0}] is is not in DB, removing from 
Memory", jobId);
+slaMap.remove(jobId);
+return;
+}
+throw e;
+}
 byte eventProc = summaryBean.getEventProcessed();
 slaCalc.setEventProcessed(eventProc);
 if (eventProc >= 7) {

http://git-wip-us.apache.org/repos/asf/oozie/blob/bcd23e18/release-log.txt
--
diff --git a/release-log.txt b/release-log.txt
index 515521c..cef8876 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.3.0 release (trunk - unreleased)
 
+OOZIE-2672 SLA periodic update does not remove job from map if job is removed 
from database (satishsaley via puru)
 OOZIE-2498 Oozie CallerId configuration for downstream components 
(abhishekbafna via rohini)
 OOZIE-2491 oozie acl cannot specify group,it does`t work (abhishekbafna via 
rohini)
 OOZIE-2569 Adding yarn-site, core-site, hdfs-site and mapred-site into spark 
launcher (abhishekbafna via rohini)