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

Examples of com.vmware.bdd.software.mgmt.plugin.model.HadoopStack


   private ClusterBlueprint generateBlueprint() {
      //return SerialUtils.getObjectByJsonString(ClusterBlueprint.class, CommonUtil.readJsonFile("simple_blueprint.json"));
      ClusterBlueprint blueprint = new ClusterBlueprint();
      blueprint.setName("cluster01");
      HadoopStack hadoopStack = new HadoopStack();
      hadoopStack.setDistro("CDH-5.0.2");
      blueprint.setHadoopStack(hadoopStack);

      List<NodeGroupInfo> groups = new ArrayList<NodeGroupInfo>();

      NodeGroupInfo group01 = new NodeGroupInfo();
View Full Code Here


                        apiStackVersionInfoSummary.getStackName(),
                        apiStackVersionInfoSummary.getStackVersion());
            ApiStackVersionInfo apiStackVersionInfo =
                  apiStackVersion.getApiStackVersionInfo();
            if (apiStackVersionInfo.isActive()) {
               HadoopStack hadoopStack = new HadoopStack();
               hadoopStack.setDistro(apiStackVersionInfo.getStackName(),
                     apiStackVersionInfo.getStackVersion());
               hadoopStack
                     .setFullVersion(apiStackVersionInfo.getStackVersion());
               hadoopStack.setVendor(apiStackVersionInfo.getStackName());

               List<String> roles = new ArrayList<String>();
               ApiStackServiceList apiStackServiceList =
                     apiManager.getStackServiceListWithComponents(
                           hadoopStack.getVendor(),
                           hadoopStack.getFullVersion());
               for (ApiStackService apiStackService : apiStackServiceList
                     .getApiStackServices()) {
                  for (ApiStackComponent apiComponent : apiStackService
                        .getServiceComponents()) {
                     roles.add(apiComponent.getApiComponent()
                           .getComponentName());
                  }
               }
               hadoopStack.setRoles(roles);

               hadoopStacks.add(hadoopStack);
            }
         }
      }
View Full Code Here

      Assert.assertFalse(stacks.get(1).getRoles().contains("YARN_NODE_MANAGER"));
   }

   @Test( groups = { "TestClouderaManagerImpl" })
   public void testGetSupportedConfigs() {
      HadoopStack stack = new HadoopStack();
      stack.setDistro("CDH-5.0.1");
      String configs = provider.getSupportedConfigs(stack);
      System.out.println(configs);
   }
View Full Code Here

*/
public class TestCmUtils {

   @Test
   public void testMajorVersionOfStack() {
      HadoopStack stack = new HadoopStack();
      stack.setDistro("CDH-5.0.1");
      Assert.assertEquals(CmUtils.majorVersionOfHadoopStack(stack), 5);
      stack.setDistro("CDH");
      Assert.assertEquals(CmUtils.majorVersionOfHadoopStack(stack), -1);
      stack.setDistro(null);
      Assert.assertEquals(CmUtils.majorVersionOfHadoopStack(stack), -1);
   }
View Full Code Here

         apiResourceRootV6.getClustersResource().createClusters(clusterList);
         for (ApiParcel apiParcel : apiResourceRootV6.getClustersResource().getParcelsResource(randomClusterName)
               .readParcels(DataView.SUMMARY).getParcels()) {
            if (apiParcel.getProduct().equals(Constants.CDH_REPO_PREFIX)) {
               DefaultArtifactVersion parcelVersion = new DefaultArtifactVersion(apiParcel.getVersion());
               HadoopStack stack = new HadoopStack();
               stack.setDistro(apiParcel.getProduct(), parcelVersion.getMajorVersion() + "."
                     + parcelVersion.getMinorVersion() + "." + parcelVersion.getIncrementalVersion());
               stack.setFullVersion(apiParcel.getVersion());
               stack.setVendor(Constants.CDH_DISTRO_VENDOR);
               List<String> roles = new ArrayList<String>();
               for (String role : AvailableServiceRoleContainer.allRoles(parcelVersion.getMajorVersion())) {
                  roles.add(role);
               }
               stack.setRoles(roles);
               hadoopStacks.add(stack);
            }
         }
         apiResourceRootV6.getClustersResource().deleteCluster(randomClusterName);
         return hadoopStacks;
View Full Code Here

   }

   public boolean validateBlueprint(ClusterBlueprint blueprint) {
      logger.info("Start to validate bludprint for cluster "
            + blueprint.getName());
      HadoopStack hadoopStack = blueprint.getHadoopStack();
      String distro = hadoopStack.getDistro();
      String stackVendor = hadoopStack.getVendor();
      String stackVersion = hadoopStack.getFullVersion();

      List<String> unRecogConfigTypes = new ArrayList<String>();
      List<String> unRecogConfigKeys = new ArrayList<>();

      validateRoles(blueprint, unRecogConfigTypes, unRecogConfigKeys,
View Full Code Here

      blueprint.setConfiguration(configuration);
      blueprint.setExternalHDFS(externalHDFS);
      blueprint.setExternalMapReduce(externalMapReduce);

      // set HadoopStack
      HadoopStack hadoopStack = new HadoopStack();
      hadoopStack.setDistro(distro);
      hadoopStack.setVendor(distroVendor);
      hadoopStack.setFullVersion(distroVersion); // TODO
      blueprint.setHadoopStack(hadoopStack);

      blueprint.setNeedToValidateConfig(validateConfig == null ? false
            : validateConfig);
View Full Code Here

TOP

Related Classes of com.vmware.bdd.software.mgmt.plugin.model.HadoopStack

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.