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/06 22:19:45 UTC

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

Repository: ambari
Updated Branches:
  refs/heads/trunk 26812c1f9 -> 91c969ac3


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


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

Branch: refs/heads/trunk
Commit: 91c969ac367abbf0c1c603af084da823d5e52e92
Parents: 26812c1
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Thu Aug 6 00:26:53 2015 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Thu Aug 6 16:19:31 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/91c969ac/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 a72e1fe..18d1df9 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 NOT EXISTS (SELECT task.requestId FROM HostRoleCommandEntity task WHERE task.status IN :notCompletedStatuses) ORDER BY task.requestId {0}";
+  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}";
 
   @Inject
   Provider<EntityManager> entityManagerProvider;
@@ -383,9 +383,9 @@ public class HostRoleCommandDAO {
 
   @Transactional
   public void removeByHostId(Long hostId) {
-    Collection<HostRoleCommandEntity> commands = this.findByHostId(hostId);
+    Collection<HostRoleCommandEntity> commands = findByHostId(hostId);
     for (HostRoleCommandEntity cmd : commands) {
-      this.remove(cmd);
+      remove(cmd);
     }
   }