Examples of Cluster


Examples of voldemort.cluster.Cluster

        boolean disableZoneBalancing = true;
        // Do some random swaps within zone
        boolean enableRandomSwaps = true;
        int swapAttempts = 100;
        int swapSuccesses = 10;
        Cluster repartitionedCluster = Repartitioner.repartition(currentCluster,
                                                                 currentStores,
                                                                 currentCluster,
                                                                 currentStores,
                                                                 null,
                                                                 1,
                                                                 disableNodeBalancing,
                                                                 disableZoneBalancing,
                                                                 enableRandomSwaps,
                                                                 swapAttempts,
                                                                 swapSuccesses,
                                                                 swapZoneIds,
                                                                 false,
                                                                 0,
                                                                 0,
                                                                 0,
                                                                 Collections.<Integer> emptyList(),
                                                                 0);
        PartitionBalance repartitionedPb = new PartitionBalance(repartitionedCluster, currentStores);

        Set<Integer> allNodeIds = repartitionedCluster.getNodeIds();
        Set<Integer> swapNodeIds = null;
        for (Integer swapZoneId: swapZoneIds) {
            swapNodeIds = repartitionedCluster.getNodeIdsInZone(swapZoneId);
        }
        // Remove nodes that we don't want to verify the partition count on
        allNodeIds.removeAll(swapNodeIds);
        for (Integer remainingNodeId : allNodeIds) {
            Set<Integer> beforeRepartition = new HashSet<Integer>(currentCluster
View Full Code Here

Examples of voldemort.cluster.Cluster

        // For each zone
        List<Integer> greedyZones = new ArrayList<Integer>(currentCluster.getZoneIds());
        int swapAttempts = 1;
        int swapsPerNode = 100;
        int swapsPerZone = 100;
        Cluster repartitionedCluster = Repartitioner.repartition(currentCluster,
                                                                 currentStores,
                                                                 currentCluster,
                                                                 currentStores,
                                                                 null,
                                                                 1,
View Full Code Here

Examples of voldemort.cluster.Cluster

    }

    @Test
    public void testShuffle() {
        // Two zone cluster
        Cluster currentCluster = ClusterTestUtils.getZZCluster();
        List<StoreDefinition> storeDefs = ClusterTestUtils.getZZStoreDefsInMemory();
        verifyBalanceZoneAndNode(currentCluster, storeDefs, currentCluster, storeDefs);
        verifyBalanceNodesNotZones(currentCluster, storeDefs, currentCluster, storeDefs);
        verifyRepartitionNoop(currentCluster, storeDefs, currentCluster, storeDefs);
        verifyRandomSwapsImproveBalance(currentCluster, storeDefs);
View Full Code Here

Examples of voldemort.cluster.Cluster

    }
    @Test
    public void testShuffleWithinZone() {
        // Two zone cluster
        Cluster currentCluster = ClusterTestUtils.getZZCluster();
        List<StoreDefinition> storeDefs = ClusterTestUtils.getZZStoreDefsInMemory();
        List<Integer> swapZoneIds = new ArrayList<Integer>();
        // Only shuffle within zone 1
        swapZoneIds.add(1);
        verifyRandomSwapsWithinZoneOnlyShufflesParitionsInThatZone(currentCluster, storeDefs,
View Full Code Here

Examples of voldemort.cluster.Cluster

    }

    @Test
    public void testClusterExpansion() {
        // Two zone cluster
        Cluster currentCluster = ClusterTestUtils.getZZCluster();
        Cluster interimCluster = ClusterTestUtils.getZZClusterWithNN();
        List<StoreDefinition> storeDefs = ClusterTestUtils.getZZStoreDefsInMemory();
        verifyBalanceZoneAndNode(currentCluster, storeDefs, interimCluster, storeDefs);
        verifyBalanceNodesNotZones(currentCluster, storeDefs, interimCluster, storeDefs);
        verifyRepartitionNoop(currentCluster, storeDefs, interimCluster, storeDefs);
View Full Code Here

Examples of voldemort.cluster.Cluster

        verifyRepartitionNoop(currentCluster, storeDefs, interimCluster, storeDefs);
    }

    @Test
    public void testZoneExpansionAsRepartitionerCLI() {
        Cluster currentCluster = ClusterTestUtils.getZZCluster();
        List<StoreDefinition> currentStoreDefs = ClusterTestUtils.getZZStoreDefsInMemory();

        Cluster interimCluster = ClusterTestUtils.getZZZClusterWithNNN();
        List<StoreDefinition> finalStoreDefs = ClusterTestUtils.getZZZStoreDefsInMemory();

        verifyBalanceZoneAndNode(currentCluster, currentStoreDefs, interimCluster, finalStoreDefs);
        // verifyBalanceNodesNotZones does not make sense for zone expansion.
        verifyRepartitionNoop(currentCluster, currentStoreDefs, interimCluster, finalStoreDefs);
View Full Code Here

Examples of voldemort.cluster.Cluster

        verifyRepartitionNoop(currentCluster, currentStoreDefs, interimCluster, finalStoreDefs);
    }

    @Test
    public void testZoneExpansionAsRebalanceControllerCLI() {
        Cluster currentCluster = ClusterTestUtils.getZZECluster();
        List<StoreDefinition> currentStoreDefs = ClusterTestUtils.getZZZStoreDefsInMemory();

        Cluster interimCluster = ClusterTestUtils.getZZZClusterWithNNN();
        List<StoreDefinition> finalStoreDefs = ClusterTestUtils.getZZZStoreDefsInMemory();

        verifyBalanceZoneAndNode(currentCluster, currentStoreDefs, interimCluster, finalStoreDefs);
        // verifyBalanceNodesNotZones does not make sense for zone expansion.
        verifyRepartitionNoop(currentCluster, currentStoreDefs, interimCluster, finalStoreDefs);
View Full Code Here

Examples of voldemort.cluster.Cluster

     *
     * @param currentCluster
     * @param currentStores
     */
    public void decontigRepartition(Cluster currentCluster, List<StoreDefinition> currentStores) {
        Cluster repartitionedCluster;

        // Repartition to balance partition IDs among zones and among nodes
        // within zone.
        int maxContigRun = 1;

View Full Code Here

Examples of voldemort.cluster.Cluster

    }

    @Test
    public void testDeContig() {
        // Two zone cluster
        Cluster currentCluster = ClusterTestUtils.getZZCluster();
        List<StoreDefinition> storeDefs = ClusterTestUtils.getZZStoreDefsInMemory();
        decontigRepartition(currentCluster, storeDefs);

        // Three zone cluster
        currentCluster = ClusterTestUtils.getZZZCluster();
View Full Code Here

Examples of voldemort.cluster.Cluster

    }
   
    @Test
    public void testShuffleWithNonContiguousZoneAndNodeIds() {
        // Two zone cluster
        Cluster currentCluster = ClusterTestUtils.getZ1Z3ImbalancedClusterWithNonContiguousNodeIds();
        List<StoreDefinition> storeDefs = ClusterTestUtils.getZ1Z3StoreDefsInMemory();
        verifyBalanceZoneAndNode(currentCluster, storeDefs, currentCluster, storeDefs);
        verifyBalanceNodesNotZones(currentCluster, storeDefs, currentCluster, storeDefs);
        verifyRepartitionNoop(currentCluster, storeDefs, currentCluster, storeDefs);
        verifyRandomSwapsImproveBalance(currentCluster, storeDefs);
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.