Updated Branches:
  refs/heads/trunk 9791a1d40 -> 1d21a41c8

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/1d21a41c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/1d21a41c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/1d21a41c

Branch: refs/heads/trunk
Commit: 1d21a41c8bd24af10d90a3ebb1c49aa6675cbb7a
Parents: 9791a1d
Author: Sumit Mohanty <[email protected]>
Authored: Wed Aug 7 16:22:02 2013 -0700
Committer: Sumit Mohanty <[email protected]>
Committed: Wed Aug 7 16:22:45 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/1d21a41c/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 12e3e41..d3676f0 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);
   }
 

Reply via email to