Examples of NodeEntity


Examples of com.vmware.bdd.entity.NodeEntity

   }

//   @Test(groups = { "TestClusteringService" }, dependsOnMethods = { "testCreateDhcpVmCreateVmPass" })
   public void testConfigIOShares() {
      List<NodeEntity> targetNodes = new ArrayList<NodeEntity>();
      NodeEntity node1 = new NodeEntity();
      node1.setVmName("cluster-data-0");
      node1.setMoId("vm-1101");
      targetNodes.add(node1);
      NodeEntity node2 = new NodeEntity();
      node1.setVmName("cluster-data-1");
      node1.setMoId("vm-1102");
      targetNodes.add(node2);
      MockTmScheduler.setFlag(VmOperation.RECONFIGURE_VM, true);
      Map<String, String> done = service.configIOShares("cluster", targetNodes, Priority.HIGH);
View Full Code Here

Examples of com.vmware.bdd.entity.NodeEntity

      roleStr.add(HadoopRole.HADOOP_DATANODE.toString());
      hdfsGroup.setRoles((new Gson()).toJson(roleStr));

      // add a hdfs node
      List<NodeEntity> nodes = new LinkedList<NodeEntity>();
      NodeEntity node0 = new NodeEntity();
      node0.setVmName(HDFS_NODE_0);
      node0.setNodeGroup(hdfsGroup);
      nodes.add(node0);

      NodeEntity node1 = new NodeEntity();
      node1.setVmName(HDFS_NODE_1);
      node1.setNodeGroup(hdfsGroup);
      nodes.add(node1);

      hdfsGroup.setNodes(nodes);

      nodeGroups.add(hdfsGroup);
View Full Code Here

Examples of com.vmware.bdd.entity.NodeEntity

      NodeGroupEntity hdfs = clusterEntityMgr.findByName(cluster, HDFS_GROUP);
      Assert.assertTrue(hdfs != null, "node group " + HDFS_GROUP
            + " should exist");

      NodeEntity hdfsNode = clusterEntityMgr.findByName(hdfs, HDFS_NODE_0);
      Assert.assertTrue(hdfsNode != null, "node " + HDFS_NODE_0
            + " should exist");
   }
View Full Code Here

Examples of com.vmware.bdd.entity.NodeEntity

      vcRpEntity.setName(ENTITY_NAME);
      vcRpEntity.setVcCluster(CLUSTER_NAME);
      vcRpEntity.setVcResourcePool(VC_RP);

      Set<NodeEntity> nodes = new HashSet<NodeEntity>();
      NodeEntity node1 = new NodeEntity();
      node1.setVmName("node1");
      NodeEntity node2 = new NodeEntity();
      node2.setVmName("node2");
      NodeGroupEntity ng = new NodeGroupEntity();
      ng.setRoles(new Gson().toJson(new String[] { "hadoop_datanode" }));
      node1.setNodeGroup(ng);
      node2.setNodeGroup(ng);
      nodes.add(node1);
      nodes.add(node2);

      vcRpEntity.setHadoopNodes(nodes);
View Full Code Here

Examples of com.vmware.bdd.entity.NodeEntity

      ng = new NodeGroupEntity();
      ng.setName(NODEGROUP_NAME);
      ng.setDefineInstanceNum(5);

      node1 = new NodeEntity();
      node1.setVmName(NODE1_NAME);
      node1.setMoId(NODE1_MOID);
      node1.setNodeGroup(ng);

      node2 = new NodeEntity();
      node2.setVmName(NODE2_NAME);
      node2.setMoId(NODE2_MOID);
      node2.setNodeGroup(ng);

      ngDAO.insert(ng);
View Full Code Here

Examples of com.vmware.bdd.entity.NodeEntity

      Assert.assertTrue(nodes.size() == 2 && nodes.contains(node1) && nodes.contains(node2));
   }

   @Test
   public void testFindByName() {
      NodeEntity node = nodeDAO.findByName(ng, NODE1_NAME);
      Assert.assertTrue(node != null && node.getVmName().equals(NODE1_NAME));

      node = nodeDAO.findByName(NODE2_NAME);
      Assert.assertTrue(node != null && node.getVmName().equals(NODE2_NAME));
   }
View Full Code Here

Examples of com.vmware.bdd.entity.NodeEntity

      Assert.assertTrue(node != null && node.getVmName().equals(NODE2_NAME));
   }

   @Test
   public void testFindByMoid() {
      NodeEntity node = nodeDAO.findByMobId(NODE1_MOID);
      Assert.assertTrue(node != null && node.getVmName().equals(NODE1_NAME));
   }
View Full Code Here

Examples of org.ardverk.dht.entity.NodeEntity

    Contact[] contacts = outcome.getContacts();
   
    if (contacts.length == 0) {
      setException(new NoSuchNodeException(outcome));       
    } else {
      setValue(new NodeEntity(outcome));
    }
  }
View Full Code Here

Examples of org.ardverk.dht.entity.NodeEntity

      NodeConfig config = new NodeConfig();
      config.setLookupTimeout(20L, TimeUnit.SECONDS);
     
      DHTFuture<NodeEntity> future
        = first.discover(lookupId, config);
      NodeEntity entity = future.get();
      TestCase.assertEquals(lookupId, entity.getId());
     
      Contact[] contacts = entity.getContacts();
      Contact[] closest = entity.getClosest();
     
      // The Contacts in the response should be in the same order
      // as our DHT instances!
      int k = first.getRouteTable().getK();
      for (int i = 0; i < k && i < contacts.length; i++) {
View Full Code Here

Examples of org.springframework.data.neo4j.annotation.NodeEntity

    private Neo4JMappingContext mappingContext;

    public EntityState<NodeBacked,Node> getEntityState(final NodeBacked entity) {
        final Class<? extends NodeBacked> entityType = entity.getClass();
        final NodeEntity graphEntityAnnotation = entityType.getAnnotation(NodeEntity.class); // todo cache ??
        final Neo4JPersistentEntity<?> persistentEntity = mappingContext.getPersistentEntity(entityType);
        if (graphEntityAnnotation.partial()) {
            final PartialNodeEntityState<NodeBacked> partialNodeEntityState = new PartialNodeEntityState<NodeBacked>(null, entity, entityType, graphDatabaseContext, getPersistenceUnitUtils(), delegatingFieldAccessorFactory, (Neo4JPersistentEntity<NodeBacked>) persistentEntity);
            return new DetachedEntityState<NodeBacked, Node>(partialNodeEntityState, graphDatabaseContext) {
                @Override
                protected boolean isDetached() {
                    return super.isDetached() || partialNodeEntityState.getId(entity) == null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.