Package com.cloudera.api.model

Examples of com.cloudera.api.model.ApiHealthSummary


         }
         if (allStopped) {
            logger.debug("Cluster " + blueprint.getName() + " services are stopped.");
            cluster.getCurrentReport().setStatus(ServiceStatus.STOPPED);
         } else if (allStarted) {
            ApiHealthSummary summary = getExistingServiceHealthStatus(cluster.getName());
            switch (summary) {
            case GOOD:
               cluster.getCurrentReport().setStatus(ServiceStatus.STARTED);
               logger.debug("Cluster " + blueprint.getName() + " is healthy.");
               break;
View Full Code Here


               blueprint.getName(), e);
      }
   }

   private ApiHealthSummary getExistingServiceHealthStatus(String clusterName) {
      ApiHealthSummary summary = ApiHealthSummary.DISABLED;
      for (ApiService apiService : apiResourceRootV6.getClustersResource()
            .getServicesResource(clusterName).readServices(DataView.SUMMARY)) {
         ApiHealthSummary health = apiService.getHealthSummary();
         logger.debug("Cluster " + clusterName + " Service "
         + apiService.getType() + " status is " + health);
         if (health.ordinal() > summary.ordinal()) {
            summary = health;
         }
      }
      logger.debug("Cluster " + clusterName + " Service status is " + summary);
      return summary;
View Full Code Here

      for (CmNodeDef node : cluster.getNodes()) {
         Map<String, NodeReport> nodeReports = cluster.getCurrentReport().getNodeReports();
         NodeReport nodeReport = nodeReports.get(node.getName());
         try {
            ApiHost host = apiResourceRootV6.getHostsResource().readHost(node.getNodeId());
            ApiHealthSummary health = host.getHealthSummary();
            switch(health) {
            case GOOD:
               List<ApiRoleRef> roleRefs = host.getRoleRefs();
               boolean hasStarted = false;
               boolean hasStopped = false;
View Full Code Here

TOP

Related Classes of com.cloudera.api.model.ApiHealthSummary

Copyright © 2018 www.massapicom. 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.