You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2015/08/07 17:13:30 UTC

ambari git commit: Revert "AMBARI-12657 - Cluster creates fail on larger deployments with SQL Azure DB (jonathanhurley)"

Repository: ambari
Updated Branches:
  refs/heads/trunk f5f3d7539 -> dcd23a7a7


Revert "AMBARI-12657 - Cluster creates fail on larger deployments with SQL Azure DB (jonathanhurley)"

This reverts commit 91c969ac367abbf0c1c603af084da823d5e52e92.


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

Branch: refs/heads/trunk
Commit: dcd23a7a762b27911bb2f21b1d1e422cfae24bd9
Parents: f5f3d75
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Fri Aug 7 11:12:38 2015 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Aug 7 11:13:12 2015 -0400

----------------------------------------------------------------------
 .../org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/dcd23a7a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
index 18d1df9..a72e1fe 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
@@ -77,7 +77,7 @@ public class HostRoleCommandDAO {
    * SQL template to get all requests which have had all of their tasks
    * COMPLETED
    */
-  private static final String COMPLETED_REQUESTS_SQL = "SELECT DISTINCT task.requestId FROM HostRoleCommandEntity task WHERE task.status NOT IN :notCompletedStatuses ORDER BY task.requestId {0}";
+  private static final String COMPLETED_REQUESTS_SQL = "SELECT DISTINCT task.requestId FROM HostRoleCommandEntity task WHERE NOT EXISTS (SELECT task.requestId FROM HostRoleCommandEntity task WHERE task.status IN :notCompletedStatuses) ORDER BY task.requestId {0}";
 
   @Inject
   Provider<EntityManager> entityManagerProvider;
@@ -383,9 +383,9 @@ public class HostRoleCommandDAO {
 
   @Transactional
   public void removeByHostId(Long hostId) {
-    Collection<HostRoleCommandEntity> commands = findByHostId(hostId);
+    Collection<HostRoleCommandEntity> commands = this.findByHostId(hostId);
     for (HostRoleCommandEntity cmd : commands) {
-      remove(cmd);
+      this.remove(cmd);
     }
   }