Examples of ClusterSpec


Examples of org.apache.whirr.service.ClusterSpec

            config.addConfiguration(
                new PropertiesConfiguration(System.getProperty("whirr.config")));
        }
        config.addConfiguration(new PropertiesConfiguration("whirr-default.properties"));

        clusterSpec = new ClusterSpec(config);
        if (clusterSpec.getPrivateKey() == null)
        {
            Map<String, String> pair = KeyPair.generate();
            clusterSpec.setPublicKey(pair.get("public"));
            clusterSpec.setPrivateKey(pair.get("private"));
View Full Code Here

Examples of org.jredis.cluster.ClusterSpec

      Log.log("Basic nodemap test of Consistent Hashing cluster model");
     
      ConsistentHashCluster model = (ConsistentHashCluster) newProviderInstance();
      assertNotNull(model, "model should not be null");
     
      ClusterSpec spec = model.getSpec();
      assertNotNull(spec, "spec should not be null");
     
      ConsistentHashCluster.NodeMap nodeMap = model.getNodeMap();
      assertNotNull(nodeMap, "node map should not be null");
     
      Collection<ClusterNodeSpec> nodes = nodeMap.values();
      assertNotNull(nodes, "value set of node map should not be null");
     
      // regardless of what hash (key) they are mapped to,
      // we expected the value set of NodeMap to contain each and every
      // ClusterNodeSpec in the ClusterSpec of the model
      //
    Log.log("NOTE: %d nodes", spec.getNodeSpecs().size());
    Log.log("NOTE: size of value set is %d ", nodes.size());
    int missCnt = 0;
      for(ClusterNodeSpec node : spec.getNodeSpecs()){
        if(!nodes.contains(node)){
          missCnt ++;
        }
//        assertTrue(nodes.contains(node), "nodeSpec should be in the value set of NodeMap: " + node);
      }
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.