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-1866 Bug in JDBCStateStore
Date Wed, 06 Apr 2016 08:15:37 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 685a561cd -> df7f37e23


FALCON-1866 Bug in JDBCStateStore

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

Reviewers: Ajay Yadava <ajayyadava@apache.org>, Pavan Kumar Kolamuri

Closes #80 from PraveenAdlakha/1866


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

Branch: refs/heads/master
Commit: df7f37e23a7d287077f07d48ecc30150bcc8b906
Parents: 685a561
Author: Praveen Adlakha <adlakha.praveen@gmail.com>
Authored: Wed Apr 6 13:45:12 2016 +0530
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Wed Apr 6 13:45:12 2016 +0530

----------------------------------------------------------------------
 .../java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/df7f37e2/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
b/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
index 2195c54..38d9217 100644
--- a/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
+++ b/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
@@ -105,10 +105,10 @@ public final class JDBCStateStore extends AbstractStateStore {
         Query q = entityManager.createNamedQuery(PersistenceConstants.GET_ENTITY);
         q.setParameter("id", id.getKey());
         List result = q.getResultList();
+        entityManager.close();
         if (result.isEmpty()) {
             return null;
         }
-        entityManager.close();
         return ((EntityBean)result.get(0));
     }
 


Mime
View raw message