Package org.voltdb.compiler

Examples of org.voltdb.compiler.ClusterConfig$Partition


     * @throws JSONException
     */
    public static List<Integer> getPartitionsToAdd(ZooKeeper zk, JSONObject topo)
            throws JSONException
    {
        ClusterConfig  clusterConfig = new ClusterConfig(topo);
        List<Integer> newPartitions = new ArrayList<Integer>();
        Set<Integer> existingParts = new HashSet<Integer>(getPartitions(zk));
        // Remove MPI
        existingParts.remove(MpInitiator.MP_INIT_PID);
        int partsToAdd = clusterConfig.getPartitionCount() - existingParts.size();

        if (partsToAdd > 0) {
            hostLog.info("Computing new partitions to add. Total partitions: " + clusterConfig.getPartitionCount());
            for (int i = 0; newPartitions.size() != partsToAdd; i++) {
                if (!existingParts.contains(i)) {
                    newPartitions.add(i);
                }
            }
View Full Code Here

TOP

Related Classes of org.voltdb.compiler.ClusterConfig$Partition

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.