Examples of ApiComponentInfo


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

         ClusterReportQueue reports)
         throws Exception {
      List<String> componentNames = new ArrayList<>();
      for (ApiHostComponent hostComponent : apiHostComponents.getHostComponents()) {
         String componentName = hostComponent.getHostComponent().getComponentName();
         ApiComponentInfo compInfo = componentToInfo.get(componentName);
         if (compInfo.isClient()) {
            continue;
         }
         componentNames.add(componentName);
      }
      if (componentNames.isEmpty()) {
View Full Code Here

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

         Set<String> serviceNames, AmNodeDef nodeDef) {
      ApiHostComponents apiHostComponents = new ApiHostComponents();
      List<ApiHostComponent> hostComponents = new ArrayList<>();
      apiHostComponents.setHostComponents(hostComponents);
      for (String componentName : nodeDef.getComponents()) {
         ApiComponentInfo definedCompInfo = componentToInfo.get(componentName);
         if (definedCompInfo == null) {
            logger.error("Component " + componentName + " is not supported. This should not happen.");
            continue;
         }
         String serviceName = definedCompInfo.getServiceName();
         if (!serviceNames.contains(serviceName)) {
            logger.info("Service " + serviceName + " is removed from Ambari, igonre component " + componentName);
            continue;
         }
         ApiHostComponent component = new ApiHostComponent();
         hostComponents.add(component);
         ApiComponentInfo componentInfo = new ApiComponentInfo();
         componentInfo.setComponentName(componentName);
         component.setHostComponent(componentInfo);
      }
      return apiHostComponents;
   }
View Full Code Here

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

   public static ApiHostsRequest createInstallComponentsRequest() {
      ApiHostsRequest hostsRequest = new ApiHostsRequest();
      ApiHostComponents components = new ApiHostComponents();
      hostsRequest.setBody(components);
      ApiComponentInfo hostRoles = new ApiComponentInfo();
      hostRoles.setState("INSTALLED");
      components.setHostRoles(hostRoles);
      ApiHostsRequestInfo requestInfo = new ApiHostsRequestInfo();
      hostsRequest.setRequestInfo(requestInfo);
      requestInfo.setContext("Installing components");
      requestInfo.setQueryString("HostRoles/state=INIT");
View Full Code Here

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

   public ApiRequest stopAllComponentsInHosts(String clusterName,
         List<String> hostNames) throws AmbariApiException {
      ApiHostsRequest hostsRequest = new ApiHostsRequest();
      ApiHostComponents apiComponents = new ApiHostComponents();
      hostsRequest.setBody(apiComponents);
      ApiComponentInfo hostRoles = new ApiComponentInfo();
      hostRoles.setState("INSTALLED");
      apiComponents.setHostRoles(hostRoles);
      ApiHostsRequestInfo requestInfo = new ApiHostsRequestInfo();
      hostsRequest.setRequestInfo(requestInfo);
      requestInfo.setContext("Stop Hosts components");
View Full Code Here

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

         List<String> hostNames, List<String> components)
         throws AmbariApiException {
      ApiHostsRequest hostsRequest = new ApiHostsRequest();
      ApiHostComponents apiComponents = new ApiHostComponents();
      hostsRequest.setBody(apiComponents);
      ApiComponentInfo hostRoles = new ApiComponentInfo();
      hostRoles.setState("STARTED");
      apiComponents.setHostRoles(hostRoles);
      ApiHostsRequestInfo requestInfo = new ApiHostsRequestInfo();
      hostsRequest.setRequestInfo(requestInfo);
      requestInfo.setContext("Start Hosts components");
View Full Code Here

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

                     }
                  }
               }
            }

            ApiComponentInfo apiComponentInfo =
                  apiStackComponent.getApiComponent();
            if (role.equals(apiComponentInfo.getComponentName())) {
               Set<String> roleCategoryDependencies =
                     validateRoleCategoryDependencies(apiComponentInfo,
                           allRoles, unRecogRoles);
               if (roleCategoryDependencies != null
                     && !roleCategoryDependencies.isEmpty()) {
View Full Code Here

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

                  apiOriginComponentInfo.getStackName(),
                  apiOriginComponentInfo.getStackVersion(),
                  apiOriginComponentInfo.getServiceName());
      for (ApiStackComponent apiTargetComponent : apiTargetService
            .getServiceComponents()) {
         ApiComponentInfo apiTargetComponentInfo =
               apiTargetComponent.getApiComponent();
         ComponentCategory targetComponentCategory =
               ComponentCategory.valueOf(apiTargetComponentInfo
                     .getComponentCategory());
         ComponentName componentName =
               ComponentName.valueOf(apiTargetComponentInfo.getComponentName());
         if (isNamenodeHa(allRoles, unRecogRoles)) {
            if (componentName.isSecondaryNamenode()) {
               continue;
            }
         } else {
View Full Code Here

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

      }
      apiHostGroup.setConfigurations(apiConfigurations);

      List<ApiComponentInfo> apiComponents = new ArrayList<ApiComponentInfo>();
      for (String componentName : components) {
         ApiComponentInfo apiComponent = new ApiComponentInfo();
         apiComponent.setName(componentName);
         apiComponents.add(apiComponent);
      }
      apiHostGroup.setApiComponents(apiComponents);
      return apiHostGroup;
   }
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.