ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: AMBARI-17085 : corrected the initialization condition of view entities. (Nitiraj Rathore via dipayanb)
Date Thu, 09 Jun 2016 12:29:12 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 a20fd0e26 -> 48caf26ad


AMBARI-17085 : corrected the initialization condition of view entities. (Nitiraj Rathore via
dipayanb)


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

Branch: refs/heads/branch-2.4
Commit: 48caf26ada6cd9247bd049cc40d7976e17bc9ffb
Parents: a20fd0e
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Thu Jun 9 17:58:01 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Thu Jun 9 17:58:51 2016 +0530

----------------------------------------------------------------------
 .../org/apache/ambari/server/view/persistence/DataStoreImpl.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/48caf26a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
index 039fd6f..a604458 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
@@ -255,7 +255,6 @@ public class DataStoreImpl implements DataStore {
     if (!initialized) {
       synchronized (this) {
         if (!initialized) {
-          initialized = true;
           try {
             for (ViewEntityEntity viewEntityEntity : viewInstanceEntity.getEntities()){
 
@@ -266,9 +265,9 @@ public class DataStoreImpl implements DataStore {
               entityMap.put(name, viewEntityEntity);
               entityClassMap.put(clazz, name);
             }
-
             configureTypes(jpaDynamicHelper, classLoader);
 
+            initialized = true;
           } catch (Exception e) {
             throwPersistenceException("Can't initialize data store for view " +
                 viewInstanceEntity.getViewName() + "." + viewInstanceEntity.getName(), e);


Mime
View raw message