Examples of AmbariServiceInfo


Examples of org.apache.ambari.view.slider.clients.AmbariServiceInfo

    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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.