falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajayyad...@apache.org
Subject falcon git commit: FALCON-1885 SLA monitoring API throws ResultNotFoundException
Date Tue, 12 Apr 2016 15:09:09 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 7bd3e9761 -> 4bf2401ad


FALCON-1885 SLA monitoring API throws ResultNotFoundException

Author: Praveen Adlakha <adlakha.praveen@gmail.com>

Reviewers: Ajay Yadava <ajayyadava@apache.org>

Closes #88 from PraveenAdlakha/1885


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

Branch: refs/heads/master
Commit: 4bf2401ad8338b181dd67e91fa6576c26741145b
Parents: 7bd3e97
Author: Praveen Adlakha <adlakha.praveen@gmail.com>
Authored: Tue Apr 12 20:14:19 2016 +0530
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Tue Apr 12 20:14:19 2016 +0530

----------------------------------------------------------------------
 .../org/apache/falcon/jdbc/MonitoringJdbcStateStore.java     | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/4bf2401a/prism/src/main/java/org/apache/falcon/jdbc/MonitoringJdbcStateStore.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/jdbc/MonitoringJdbcStateStore.java b/prism/src/main/java/org/apache/falcon/jdbc/MonitoringJdbcStateStore.java
index 6345d44..9c9efa0 100644
--- a/prism/src/main/java/org/apache/falcon/jdbc/MonitoringJdbcStateStore.java
+++ b/prism/src/main/java/org/apache/falcon/jdbc/MonitoringJdbcStateStore.java
@@ -84,13 +84,7 @@ public class MonitoringJdbcStateStore {
         EntityManager entityManager = getEntityManager();
         Query q = entityManager.createNamedQuery(PersistenceConstants.GET_ALL_MONITORING_FEEDS);
         List result = q.getResultList();
-        try{
-            if (result.isEmpty()) {
-                throw new ResultNotFoundException("No Feed has been scheduled for monitoring.");
-            }
-        } finally {
-            entityManager.close();
-        }
+        entityManager.close();
         return result;
     }
 


Mime
View raw message