Boolean ascOrder,
Set<String> requestedPropertyIds)
throws NoSuchResourceException, NoSuchParentResourceException {
Set<Resource> response = new HashSet<Resource>();
ActionManager actionManager = getManagementController().getActionManager();
if (clusterName != null) {
Clusters clusters = getManagementController().getClusters();
//validate that cluster exists, throws exception if it doesn't.
try {
clusters.getCluster(clusterName);
} catch (AmbariException e) {
throw new NoSuchParentResourceException(e.getMessage(), e);
}
}
if (requestId == null) {
org.apache.ambari.server.actionmanager.RequestStatus status = null;
if (requestStatus != null) {
status = org.apache.ambari.server.actionmanager.RequestStatus.valueOf(requestStatus);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Received a Get Request Status request"
+ ", requestId=null"
+ ", requestStatus=" + status);
}
List<Long> requestIds = actionManager.getRequestsByStatus(status,
maxResults != null ? maxResults : BaseRequest.DEFAULT_PAGE_SIZE,
ascOrder != null ? ascOrder : false);
LOG.debug("List<Long> requestIds = actionManager.getRequestsByStatus = {}", requestIds.size());
response.addAll(getRequestResources(clusterName, actionManager, requestIds,