AmbariClusterInfo clusterInfo = ambariClient.getClusterInfo();
if (clusterInfo != null) {
AmbariCluster cluster = ambariClient.getCluster(clusterInfo);
List<AmbariServiceInfo> services = cluster.getServices();
if (services != null && !services.isEmpty()) {
AmbariServiceInfo hdfsService = null, yarnService = null, zkService = null;
for (AmbariServiceInfo service : services) {
if ("HDFS".equals(service.getId())) {
hdfsService = service;
} else if ("YARN".equals(service.getId())) {
yarnService = service;
} else if ("ZOOKEEPER".equals(service.getId())) {
zkService = service;
}
}
if (hdfsService == null) {
viewErrors.add("Slider applications view requires HDFS service");
} else {
if (!hdfsService.isStarted()) {
viewErrors
.add("Slider applications view requires HDFS service to be started");
}
}
if (yarnService == null) {