Examples of ApiServiceInfo


Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiServiceInfo

   }

   @Override
   public ApiRequest stopAllServicesInCluster(String clusterName) throws AmbariApiException {
      logger.info("Ambari is stopping all services in cluster " + clusterName);
      ApiServiceInfo serviceInfo = new ApiServiceInfo();
      serviceInfo.setState(ApiServiceStatus.INSTALLED.name());
      ApiBody body = new ApiBody();
      body.setServiceInfo(serviceInfo);
      ApiRequestInfo requestInfo = new ApiRequestInfo();
      requestInfo.setContext("Stop All Services");
      ApiPutRequest stopRequest = new ApiPutRequest(requestInfo, body);
View Full Code Here

Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiServiceInfo

      return ApiUtils.jsonToObject(ApiRequest.class, stopServicesJson);
   }

   @Override
   public ApiRequest startAllServicesInCluster(String clusterName) throws AmbariApiException {
      ApiServiceInfo serviceInfo = new ApiServiceInfo();
      serviceInfo.setState(ApiServiceStatus.STARTED.name());
      ApiBody body = new ApiBody();
      body.setServiceInfo(serviceInfo);
      ApiRequestInfo requestInfo = new ApiRequestInfo();
      requestInfo.setContext("Start All Services");
      ApiPutRequest stopRequest = new ApiPutRequest(requestInfo, body);
View Full Code Here

Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiServiceInfo

            ApiUtils.jsonToObject(ApiCluster.class, clusterJson);
      List<ApiService> apiServices = apiCluster.getApiServices();
      List<String> servicesNames = null;
      for (ApiService apiService : apiServices) {
         if (apiService != null) {
            ApiServiceInfo serviceInfo = apiService.getServiceInfo();
            if (serviceInfo != null) {
               String serviceName = serviceInfo.getServiceName();
               if (serviceName != null) {
                  if (servicesNames == null) {
                     servicesNames = new ArrayList<String>();
                  }
                  servicesNames.add(serviceName);
View Full Code Here

Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiServiceInfo

      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;
               if (alert != null && alert.getSummary() != null
                     && alert.getSummary().getCritical() > 0) {
                  hasStartedAlert = true;
               }
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.