Search in sources :

Example 86 with StoreDefinition

use of voldemort.store.StoreDefinition in project voldemort by voldemort.

the class RepartitionerTest method testZoneExpansionAsRepartitionerCLI.

@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);
}
Also used : StoreDefinition(voldemort.store.StoreDefinition) Cluster(voldemort.cluster.Cluster) Test(org.junit.Test)

Example 87 with StoreDefinition

use of voldemort.store.StoreDefinition in project voldemort by voldemort.

the class RepartitionerTest method testDeContig.

@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();
    storeDefs = ClusterTestUtils.getZZZStoreDefsInMemory();
    decontigRepartition(currentCluster, storeDefs);
}
Also used : StoreDefinition(voldemort.store.StoreDefinition) Cluster(voldemort.cluster.Cluster) Test(org.junit.Test)

Example 88 with StoreDefinition

use of voldemort.store.StoreDefinition in project voldemort by voldemort.

the class RepartitionerTest method testZoneExpansionAsRebalanceControllerCLI.

@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);
}
Also used : StoreDefinition(voldemort.store.StoreDefinition) Cluster(voldemort.cluster.Cluster) Test(org.junit.Test)

Example 89 with StoreDefinition

use of voldemort.store.StoreDefinition in project voldemort by voldemort.

the class RepartitionerTest method testClusterExpansion.

@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);
    // Three zone cluster
    currentCluster = ClusterTestUtils.getZZZCluster();
    interimCluster = ClusterTestUtils.getZZZClusterWithNNN();
    storeDefs = ClusterTestUtils.getZZZStoreDefsInMemory();
    verifyBalanceZoneAndNode(currentCluster, storeDefs, interimCluster, storeDefs);
    verifyBalanceNodesNotZones(currentCluster, storeDefs, interimCluster, storeDefs);
    verifyRepartitionNoop(currentCluster, storeDefs, interimCluster, storeDefs);
}
Also used : StoreDefinition(voldemort.store.StoreDefinition) Cluster(voldemort.cluster.Cluster) Test(org.junit.Test)

Example 90 with StoreDefinition

use of voldemort.store.StoreDefinition in project voldemort by voldemort.

the class StoreDefinitionMapperTest method testCompressedStore.

public void testCompressedStore() {
    StoreDefinitionsMapper mapper = new StoreDefinitionsMapper();
    List<StoreDefinition> storeDefs = mapper.readStoreList(new StringReader(VoldemortTestConstants.getCompressedStoreDefinitionsXml()));
    String written = mapper.writeStoreList(storeDefs);
    assertEquals(storeDefs, mapper.readStoreList(new StringReader(written)));
}
Also used : StoreDefinition(voldemort.store.StoreDefinition) StringReader(java.io.StringReader)

Aggregations

StoreDefinition (voldemort.store.StoreDefinition)215 Cluster (voldemort.cluster.Cluster)74 Test (org.junit.Test)67 ArrayList (java.util.ArrayList)56 HashMap (java.util.HashMap)50 StoreDefinitionsMapper (voldemort.xml.StoreDefinitionsMapper)50 VoldemortException (voldemort.VoldemortException)49 ByteArray (voldemort.utils.ByteArray)49 Node (voldemort.cluster.Node)43 StoreDefinitionBuilder (voldemort.store.StoreDefinitionBuilder)42 SerializerDefinition (voldemort.serialization.SerializerDefinition)38 File (java.io.File)34 StringReader (java.io.StringReader)34 Versioned (voldemort.versioning.Versioned)29 IOException (java.io.IOException)24 List (java.util.List)23 Store (voldemort.store.Store)21 AdminClient (voldemort.client.protocol.admin.AdminClient)19 RoutingStrategyFactory (voldemort.routing.RoutingStrategyFactory)19 ClusterMapper (voldemort.xml.ClusterMapper)18