You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2013/08/08 01:22:17 UTC

git commit: AMBARI-2838. Running Requests are not visibile on the UI since the API is not returning the running requests. (smohanty)

Updated Branches:
  refs/heads/branch-1.2.5 0a29a33a4 -> 11d666f8d


AMBARI-2838. Running Requests are not visibile on the UI since the API is not returning the running requests. (smohanty)


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

Branch: refs/heads/branch-1.2.5
Commit: 11d666f8d8eb3b2987f2d03f898a219cd15aa311
Parents: 0a29a33
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Wed Aug 7 16:22:02 2013 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Wed Aug 7 16:22:02 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/11d666f8/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 5f36e45..d525749 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
@@ -43,8 +43,7 @@ public class HostRoleCommandDAO {
   @Inject
   DaoUtils daoUtils;
   private static Logger LOG = LoggerFactory.getLogger(HostRoleCommandDAO.class);
-  private static final int REQUESTS_RESULT_LIMIT_WITH_FILTER =  20;
-  private static final int REQUESTS_RESULT_LIMIT = 100;
+  private static final int REQUESTS_RESULT_LIMIT = 10;
 
   @Transactional
   public HostRoleCommandEntity findByPK(long taskId) {
@@ -66,7 +65,6 @@ public class HostRoleCommandDAO {
         "SELECT task FROM HostRoleCommandEntity task " +
             "WHERE task.requestId IN ?1 " +
             "ORDER BY task.taskId", HostRoleCommandEntity.class);
-    query.setMaxResults(REQUESTS_RESULT_LIMIT);
     return daoUtils.selectList(query, requestIds);
   }
 
@@ -77,7 +75,6 @@ public class HostRoleCommandDAO {
             "WHERE task.requestId IN ?1 AND task.taskId IN ?2 " +
             "ORDER BY task.taskId", HostRoleCommandEntity.class
     );
-    query.setMaxResults(REQUESTS_RESULT_LIMIT);
     return daoUtils.selectList(query, requestIds, taskIds);
   }
 
@@ -107,7 +104,7 @@ public class HostRoleCommandDAO {
         "FROM HostRoleCommandEntity command ORDER BY command.requestId DESC";
     TypedQuery<Long> query = entityManagerProvider.get().createQuery(queryStr,
         Long.class);
-    query.setMaxResults(20);
+    query.setMaxResults(REQUESTS_RESULT_LIMIT);
     return daoUtils.selectList(query);
   }