@RequiresSession
  public HostRoleCommandEntity findByPK(long taskId) {
    return entityManagerProvider.get().find(HostRoleCommandEntity.class, taskId);
  }
Loads the counts of tasks for a request and groups them by stage id.
This allows for very efficient loading when there are a huge number of stages
and tasks to iterate (for example, during a Stack Upgrade).
@param requestId the request id
@return the map of stage-to-summary objects
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java