Package com.vmware.bdd.plugin.ambari.api.model.stack

Examples of com.vmware.bdd.plugin.ambari.api.model.stack.ComponentCategory


   private Set<String> validateRoleCategoryDependencies(
         ApiComponentInfo apiOriginComponentInfo, Set<String> allRoles, List<String> unRecogRoles) {
      List<String> masterRoles = new ArrayList<String>();
      List<String> slaveRoles = new ArrayList<String>();
      Set<String> NotExistDenpendencies = new HashSet<String>();
      ComponentCategory componentCategory =
            ComponentCategory.valueOf(apiOriginComponentInfo
                  .getComponentCategory());
      if (componentCategory.isMaster()) {
         return NotExistDenpendencies;
      }

      ApiStackService apiTargetService =
            apiManager.getStackServiceWithComponents(
                  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 {
            if (componentName.isJournalnode() || componentName.isZkfc()) {
               continue;
            }
         }
         if (targetComponentCategory.isMaster()) {
            masterRoles.add(componentName.toString());
         }
         if (targetComponentCategory.isSlave()) {
            slaveRoles.add(componentName.toString());
         }
      }
      if (componentCategory.isSlave()) {
         for (String masterRole : masterRoles) {
View Full Code Here

TOP

Related Classes of com.vmware.bdd.plugin.ambari.api.model.stack.ComponentCategory

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.