Package com.vmware.bdd.spectypes

Examples of com.vmware.bdd.spectypes.ServiceType


         }
      }
   }

   private void setExternalMapReduceFromConf(ClusterBlueprint blueprint) {
      ServiceType type = getMapReduceType(blueprint);
      if (blueprint.getConfiguration() != null) {
         Map conf = blueprint.getConfiguration();
         Map hadoopConf = (Map) conf.get("hadoop");
         if (hadoopConf != null) {
            Map coreSiteConf = null;
            String mapreduce = "";
            if (type == null || type.equals(ServiceType.MAPRED)) {
               coreSiteConf = (Map) hadoopConf.get("mapred-site.xml");
               if (coreSiteConf != null) {
                  mapreduce = (String) coreSiteConf.get("mapred.job.tracker");
               }
            } else {
View Full Code Here


      Map<String, Object> hadoopConf = (Map<String, Object>) conf.get("hadoop");
      if (hadoopConf == null) {
         hadoopConf = new HashMap<String, Object>();
         conf.put("hadoop", hadoopConf);
      }
      ServiceType type = getMapReduceType(blueprint);
      Map<String, Object> coreSiteConf = null;
      if (type == null || type.equals(ServiceType.MAPRED)) {
         coreSiteConf = (Map<String, Object>) hadoopConf.get("mapred-site.xml");
         if (coreSiteConf == null) {
            coreSiteConf = new HashMap<String, Object>();
            hadoopConf.put("mapred-site.xml", coreSiteConf);
         }
         coreSiteConf.put("mapred.job.tracker",
               blueprint.getExternalMapReduce());
      }
      if (type == null || type.equals(ServiceType.YARN)){
         coreSiteConf = (Map<String, Object>) hadoopConf.get("yarn-site.xml");
         if (coreSiteConf == null) {
            coreSiteConf = new HashMap<String, Object>();
            hadoopConf.put("yarn-site.xml", coreSiteConf);
         }
View Full Code Here

      }
      String[] propertyPath = null;
      Map<String, Object> confTmp = null;
      for (NodeGroupInfo nodeGroup : nodeGroups) {
         Map<String, Object> conf = nodeGroup.getConfiguration();
         ServiceType type = getMapReduceType(nodeGroup);
         if (conf != null) {
            confTmp =conf;
            if (type == null || type.equals(ServiceType.MAPRED)) {
               propertyPath = new String[] { "hadoop", "mapred-site.xml", "mapred.job.tracker" };
               setPropertyOfConfiguration(conf, propertyPath, externalHDFS);
            }
            conf = confTmp;
            if (type == null || type.equals(ServiceType.YARN)) {
               propertyPath = new String[] { "hadoop", "yarn-site.xml", "yarn.resourcemanager.hostname" };
               setPropertyOfConfiguration(conf, propertyPath, externalHDFS);
            }
         }
      }
View Full Code Here

         }
      }
   }

   private ServiceType getMapReduceType(ClusterBlueprint blueprint) {
      ServiceType type = null;
      List<String> roles = new ArrayList<String>();
      for (NodeGroupInfo group : blueprint.getNodeGroups()) {
         roles.addAll(group.getRoles());
      }
      if (roles.contains(HadoopRole.HADOOP_NODEMANAGER_ROLE.toString())) {
View Full Code Here

      }
      return type;
   }

   private ServiceType getMapReduceType(NodeGroupInfo group) {
      ServiceType type = null;
      List<String> roles = new ArrayList<String>();
      roles.addAll(group.getRoles());
      if (roles.contains(HadoopRole.HADOOP_NODEMANAGER_ROLE.toString())) {
         type = ServiceType.YARN;
      } else if (roles.contains(HadoopRole.HADOOP_TASKTRACKER.toString())) {
View Full Code Here

TOP

Related Classes of com.vmware.bdd.spectypes.ServiceType

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.