ApiUtils.jsonToObject(ApiRequest.class, requestWithTasksJson);
return apiRequest;
}
public ServiceStatus getClusterStatus(String clusterName, HadoopStack stack) throws AmbariApiException {
ApiServiceAlertList serviceList = getServicesWithAlert(clusterName);
if (serviceList.getApiServiceAlerts() != null) {
boolean allStopped = true;
boolean hasStartedAlert = false;
List<String> notStartedServiceNames = new ArrayList<>();
for (ApiServiceAlert service : serviceList.getApiServiceAlerts()) {
ApiServiceInfo info = service.getApiServiceInfo();
ApiAlert alert = service.getApiAlert();
if (ApiServiceStatus.STARTED.name().equalsIgnoreCase(
info.getState())) {
allStopped = false;