use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ClusterTestUtils method getStoreDefsWithNonContiguousZones.
/*
* Non contiguous storeDefs methods. This is the inner method that all
* specific storeDef creation methods call.
*
*/
public static List<StoreDefinition> getStoreDefsWithNonContiguousZones(String storageType, String storeName, HashMap<Integer, Integer> zoneRep, int requiredReads, int requiredWrites, int zoneCountReads, int zoneCountWrites) {
List<StoreDefinition> storeDefs = new LinkedList<StoreDefinition>();
int totalReplicationFactor = 0;
for (Integer value : zoneRep.values()) {
totalReplicationFactor += value;
}
StoreDefinition storeDef = new StoreDefinitionBuilder().setName(storeName).setType(storageType).setRoutingPolicy(RoutingTier.CLIENT).setRoutingStrategyType(RoutingStrategyType.ZONE_STRATEGY).setKeySerializer(new SerializerDefinition("string")).setValueSerializer(new SerializerDefinition("string")).setReplicationFactor(totalReplicationFactor).setZoneReplicationFactor(zoneRep).setRequiredReads(requiredReads).setRequiredWrites(requiredWrites).setZoneCountReads(zoneCountReads).setZoneCountWrites(zoneCountWrites).build();
storeDefs.add(storeDef);
return storeDefs;
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ClusterTestUtils method getZZ322StoreDefs.
public static List<StoreDefinition> getZZ322StoreDefs(String storageType) {
List<StoreDefinition> storeDefs = new LinkedList<StoreDefinition>();
HashMap<Integer, Integer> zoneRep322 = new HashMap<Integer, Integer>();
zoneRep322.put(0, 3);
zoneRep322.put(1, 3);
StoreDefinition storeDef322 = new StoreDefinitionBuilder().setName("ZZ322").setType(storageType).setRoutingPolicy(RoutingTier.CLIENT).setRoutingStrategyType(RoutingStrategyType.ZONE_STRATEGY).setKeySerializer(new SerializerDefinition("string")).setValueSerializer(new SerializerDefinition("string")).setReplicationFactor(6).setZoneReplicationFactor(zoneRep322).setRequiredReads(2).setRequiredWrites(2).setZoneCountReads(0).setZoneCountWrites(0).build();
storeDefs.add(storeDef322);
return storeDefs;
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ClusterTestUtils method getZZ322StoreDefsWithNonContiguousZoneIds.
public static List<StoreDefinition> getZZ322StoreDefsWithNonContiguousZoneIds(String storageType) {
List<StoreDefinition> storeDefs = new LinkedList<StoreDefinition>();
HashMap<Integer, Integer> zoneRep322 = new HashMap<Integer, Integer>();
zoneRep322.put(0, 3);
zoneRep322.put(2, 3);
StoreDefinition storeDef322 = new StoreDefinitionBuilder().setName("ZZ322").setType(storageType).setRoutingPolicy(RoutingTier.CLIENT).setRoutingStrategyType(RoutingStrategyType.ZONE_STRATEGY).setKeySerializer(new SerializerDefinition("string")).setValueSerializer(new SerializerDefinition("string")).setReplicationFactor(6).setZoneReplicationFactor(zoneRep322).setRequiredReads(2).setRequiredWrites(2).setZoneCountReads(0).setZoneCountWrites(0).build();
storeDefs.add(storeDef322);
return storeDefs;
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ClusterTestUtils method getZZ211StoreDefs.
public static List<StoreDefinition> getZZ211StoreDefs(String storageType) {
List<StoreDefinition> storeDefs = new LinkedList<StoreDefinition>();
HashMap<Integer, Integer> zoneRep211 = new HashMap<Integer, Integer>();
zoneRep211.put(0, 2);
zoneRep211.put(1, 2);
StoreDefinition storeDef211 = new StoreDefinitionBuilder().setName("ZZ211").setType(storageType).setRoutingPolicy(RoutingTier.CLIENT).setRoutingStrategyType(RoutingStrategyType.ZONE_STRATEGY).setKeySerializer(new SerializerDefinition("string")).setValueSerializer(new SerializerDefinition("string")).setReplicationFactor(4).setZoneReplicationFactor(zoneRep211).setRequiredReads(1).setRequiredWrites(1).setZoneCountReads(0).setZoneCountWrites(0).build();
storeDefs.add(storeDef211);
return storeDefs;
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ClusterTestUtils method getZZZ111StoreDefs.
public static List<StoreDefinition> getZZZ111StoreDefs(String storageType) {
List<StoreDefinition> storeDefs = new LinkedList<StoreDefinition>();
HashMap<Integer, Integer> zoneRep111 = new HashMap<Integer, Integer>();
zoneRep111.put(0, 1);
zoneRep111.put(1, 1);
zoneRep111.put(2, 1);
StoreDefinition storeDef111 = new StoreDefinitionBuilder().setName("ZZ111").setType(storageType).setRoutingPolicy(RoutingTier.CLIENT).setRoutingStrategyType(RoutingStrategyType.ZONE_STRATEGY).setKeySerializer(new SerializerDefinition("string")).setValueSerializer(new SerializerDefinition("string")).setReplicationFactor(3).setZoneReplicationFactor(zoneRep111).setRequiredReads(1).setRequiredWrites(1).setZoneCountReads(0).setZoneCountWrites(0).build();
storeDefs.add(storeDef111);
return storeDefs;
}
Aggregations