Package com.vmware.bdd.entity

Examples of com.vmware.bdd.entity.NodeGroupAssociation


         NodeGroupEntity nodeGroup, int instanceNum) {
      Set<NodeGroupAssociation> associations = nodeGroup.getGroupAssociations();
      if (associations != null && !associations.isEmpty()) {
         AuAssert.check(associations.size() == 1,
               "only support 1 group association now");
         NodeGroupAssociation association = associations.iterator().next();
         if (association.getAssociationType() == GroupAssociationType.STRICT) {
            NodeGroupEntity refGroup =
                  clusterEntityMgr.findByName(nodeGroup.getCluster(),
                        association.getReferencedGroup());
            AuAssert.check(refGroup != null, "shold not happens");

            int hostNum = 1;
            int refHostNum = refGroup.getDefineInstanceNum();
            if (nodeGroup.getInstancePerHost() != null) {
View Full Code Here


         List<GroupAssociation> associons = policies.getGroupAssociations();
         if (associons != null) {
            Set<NodeGroupAssociation> associonEntities =
                  new HashSet<NodeGroupAssociation>();
            for (GroupAssociation a : associons) {
               NodeGroupAssociation ae = new NodeGroupAssociation();
               ae.setAssociationType(a.getType());
               ae.setNodeGroup(groupEntity);
               ae.setReferencedGroup(a.getReference());
               associonEntities.add(ae);
            }
            groupEntity.setGroupAssociations(associonEntities);
         }
         if (policies.getInstancePerHost() != null) {
View Full Code Here

      roleStr.add(HadoopRole.HADOOP_TASKTRACKER.toString());
      computeGroup.setRoles((new Gson()).toJson(roleStr));

      Set<NodeGroupAssociation> associations =
            new HashSet<NodeGroupAssociation>();
      NodeGroupAssociation association = new NodeGroupAssociation();

      association.setReferencedGroup(HDFS_GROUP);
      association.setAssociationType(GroupAssociationType.STRICT);
      association.setNodeGroup(computeGroup);

      associations.add(association);

      computeGroup.setGroupAssociations(associations);
      computeGroup.setNodes(new LinkedList<NodeEntity>());
View Full Code Here

      roleStr.add(COMPUTE_NODE_ROLE);
      computeGroup.setRoles((new Gson()).toJson(roleStr));

      Set<NodeGroupAssociation> associations =
            new HashSet<NodeGroupAssociation>();
      NodeGroupAssociation association = new NodeGroupAssociation();

      association.setReferencedGroup(HDFS_GROUP);
      association.setAssociationType(GroupAssociationType.STRICT);
      association.setNodeGroup(computeGroup);

      associations.add(association);

      computeGroup.setGroupAssociations(associations);
View Full Code Here

TOP

Related Classes of com.vmware.bdd.entity.NodeGroupAssociation

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.