Package com.vmware.bdd.software.mgmt.plugin.intf

Examples of com.vmware.bdd.software.mgmt.plugin.intf.SoftwareManager


      String appManager = cluster.getAppManager();
      if (appManager == null) {
         appManager = Constants.IRONFAN;
      }
      SoftwareManager softwareManager = getSoftwareManager(appManager);
      HadoopStack stack =
            filterDistroFromAppManager(softwareManager, cluster.getDistro());
      if (cluster.getDistro() == null || stack == null) {
         throw BddException.INVALID_PARAMETER("distro", cluster.getDistro());
      }
      // only check roles validity in server side, but not in CLI and GUI, because roles info exist in server side.
      ClusterBlueprint blueprint = cluster.toBlueprint();
      try {
         softwareManager.validateBlueprint(cluster.toBlueprint());
         cluster.validateClusterCreate(failedMsgList, warningMsgList);
      } catch (ValidationException e) {
         failedMsgList.addAll(e.getFailedMsgList());
         warningMsgList.addAll(e.getWarningMsgList());
      }
View Full Code Here


      } else {
         sharedPattern = datastoreMgr.getAllSharedDatastores();
         localPattern = datastoreMgr.getAllLocalDatastores();
      }

      SoftwareManager softwareManager =
            getSoftwareManager(clusterEntity.getAppManager());
      CommonClusterExpandPolicy.expandGroupInstanceType(groupEntity, group,
            sharedPattern, localPattern, softwareManager);
      String haFlag = group.getHaFlag();
      if (haFlag == null) {
View Full Code Here

               storeNames));

      storage.setShares(ngEntity.getCluster().getIoShares());

      // set storage split policy based on group roles
      SoftwareManager softwareManager =
            getSoftwareManager(ngEntity.getCluster().getAppManager());
      if (softwareManager.twoDataDisksRequired(group.toNodeGroupInfo())) {
         logger.debug("use bi_sector disk layout for zookeeper only group.");
         storage.setSplitPolicy(DiskSplitPolicy.BI_SECTOR);
      } else {
         if (storage.getType().equalsIgnoreCase(DatastoreType.LOCAL.toString())) {
            logger.debug("use even split disk layout for local datastore.");
View Full Code Here

      if (cluster == null) {
         logger.error("cluster " + clusterName + " does not exist");
         throw BddException.NOT_FOUND("Cluster", clusterName);
      }
      SoftwareManager softwareManager =
            getSoftwareManager(cluster.getAppManager());
      // read distro and distroVersion from ClusterEntity and set to ClusterCreate
      clusterCreate.setDistro(cluster.getDistro());
      clusterCreate.setDistroVersion(cluster.getDistroVersion());
      if (!CommonUtil.isBlank(cluster.getAdvancedProperties())) {
         Gson gson = new Gson();
         Map<String, String> advancedProperties =
               gson.fromJson(cluster.getAdvancedProperties(), Map.class);
         clusterCreate.setExternalHDFS(advancedProperties.get("ExternalHDFS"));
         clusterCreate.setExternalMapReduce(advancedProperties
               .get("ExternalMapReduce"));
         clusterCreate.setLocalRepoURL(advancedProperties.get("LocalRepoURL"));
      }
      // only check roles validity in server side, but not in CLI and GUI, because roles info exist in server side.
      ClusterBlueprint blueprint = clusterCreate.toBlueprint();
      try {
         softwareManager.validateBlueprint(blueprint);
      } catch (ValidationException e) {
         throw ClusterConfigException.INVALID_SPEC(e.getFailedMsgList());
      }

      updateInfrastructure(clusterCreate, softwareManager, blueprint);
View Full Code Here

         if (!refreshAllNodes && !vm.getId().equalsIgnoreCase(masterMoId)) {
            continue;
         }
         List<String> roles =
               new Gson().fromJson(node.getNodeGroup().getRoles(), List.class);
         SoftwareManager softMgr =
            softwareManagerCollector.getSoftwareManager(cluster.getAppManager());

         boolean isComputeOnlyNode =
            softMgr.isComputeOnlyRoles(roles);
         SetAutoElasticitySP sp =
               new SetAutoElasticitySP(clusterName, vm, serengetiUUID,
                     masterMoId, masterUUID, enableAutoElasticity,
                     minComputeNodeNum, maxComputeNodeNum, jobTrackerPort,
                     isComputeOnlyNode);
View Full Code Here

      logger.info("createVcResourcePools, start to create VC ResourcePool(s).");
      /*
       * define cluster resource pool name.
       */
      String clusterName = vNodes.get(0).getClusterName();
      SoftwareManager softManager =
            softwareManagerCollector
                  .getSoftwareManagerByClusterName(clusterName);
      String uuid = ConfigInfo.getSerengetiUUID();
      String clusterRpName = uuid + "-" + clusterName;
      if (clusterRpName.length() > VC_RP_MAX_NAME_LENGTH) {
View Full Code Here

         // change disk mode to persistent, instead of independent_persistent, since FT requires this
         persistentDiskMode = true;
      }

      List<String> roles = vNode.getNodeGroup().getRoles();
      SoftwareManager softMgr =
         softwareManagerCollector.getSoftwareManagerByClusterName(vNode.getClusterName());

      if (roles != null && softMgr.hasMgmtRole(roles)) {
         logger.debug(vNode.getVmName() + " is a master node");
         logger.debug("set disk mode to persistent for VM " + vNode.getVmName());
         // change disk mode to persistent, instead of independent_persistent, to allow snapshot and clone on VM
         persistentDiskMode = true;
      }
View Full Code Here

         container.addResource(cl);
      }

      // check time on hosts
      int maxTimeDiffInSec = Constants.MAX_TIME_DIFF_IN_SEC;
      SoftwareManager softMgr =
            softwareManagerCollector.getSoftwareManager(clusterSpec
                  .getAppManager());
      if (softMgr.hasHbase(clusterSpec.toBlueprint()))
         maxTimeDiffInSec = Constants.MAX_TIME_DIFF_IN_SEC_HBASE;

      List<String> outOfSyncHosts = new ArrayList<String>();
      for (AbstractHost host : container.getAllHosts()) {
         int hostTimeDiffInSec =
View Full Code Here

   }

   @Override
   public boolean isSupportVHM(String clusterName) {
      ClusterEntity cluster = getClusterEntityMgr().findByName(clusterName);
      SoftwareManager softMgr =
            softwareManagerCollector
                  .getSoftwareManagerByClusterName(clusterName);
      if (!softMgr.hasComputeMasterGroup(getClusterEntityMgr()
            .toClusterBluePrint(clusterName))) {
         logger.warn("Use of auto elasticity, must configure Jobtracker or ResourceManager.");
         return false;
      }
      return true;
View Full Code Here

                  continue;
               }
               ClusterBlueprint blueprint =
                     lockedEntityManager.getClusterEntityMgr()
                           .toClusterBluePrint(clusterName);
               SoftwareManager softMgr =
                     softwareManagerCollector
                           .getSoftwareManagerByClusterName(clusterName);
               if (softMgr == null) {
                  logger.error("No software manager for cluster " + clusterName
                        + " available.");
                  continue;
               }
               ClusterReport report = softMgr.queryClusterStatus(blueprint);
               if (report == null) {
                  logger.debug("No service status got from software manager, ignore it.");
                  continue;
               }
               logger.debug("Got cluster status: " + report.getStatus());
View Full Code Here

TOP

Related Classes of com.vmware.bdd.software.mgmt.plugin.intf.SoftwareManager

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.