use of voldemort.store.socket.clientrequest.ClientRequestExecutorPool in project voldemort by voldemort.
the class ZoneCountWriteTest method setup.
@Before
public void setup() throws IOException {
storeDef = storeDefs.get(0);
Integer zoneCountWrite = 1;
// override
storeDef = new StoreDefinition(storeDef.getName(), storeDef.getType(), storeDef.getDescription(), storeDef.getKeySerializer(), storeDef.getValueSerializer(), storeDef.getTransformsSerializer(), storeDef.getRoutingPolicy(), storeDef.getRoutingStrategyType(), storeDef.getReplicationFactor(), storeDef.getPreferredReads(), storeDef.getRequiredReads(), storeDef.getPreferredWrites(), storeDef.getRequiredWrites(), storeDef.getViewTargetStoreName(), storeDef.getValueTransformation(), storeDef.getZoneReplicationFactor(), storeDef.getZoneCountReads(), zoneCountWrite, storeDef.getRetentionDays(), storeDef.getRetentionScanThrottleRate(), storeDef.getRetentionFrequencyDays(), storeDef.getSerializerFactory(), storeDef.getHintedHandoffStrategyType(), storeDef.getHintPrefListSize(), storeDef.getOwners(), storeDef.getMemoryFootprintMB());
storeDefs.set(0, storeDef);
SocketStoreClientFactory socketStoreClientFactory = new SocketStoreClientFactory(clientConfig);
for (Integer nodeId : cluster.getNodeIds()) {
SocketStoreFactory socketStoreFactory = new ClientRequestExecutorPool(2, 10000, 100000, 1024);
VoldemortConfig config = ServerTestUtils.createServerConfigWithDefs(true, nodeId, TestUtils.createTempDir().getAbsolutePath(), cluster, storeDefs, new Properties());
VoldemortServer vs = ServerTestUtils.startVoldemortServer(socketStoreFactory, config, cluster);
vservers.put(nodeId, vs);
}
client = socketStoreClientFactory.getRawStore(storeDef.getName(), null);
}
use of voldemort.store.socket.clientrequest.ClientRequestExecutorPool in project voldemort by voldemort.
the class AvroAddStoreTest method setup.
/**
* This test is to partially test the functionality of SetMetadata feature
* of the VoldemortAdminTool
*/
@Before
public void setup() throws IOException {
// setup cluster
cluster = ClusterTestUtils.getZZZCluster();
oldStores = ClusterTestUtils.getZZZStoreDefsInMemory();
bsURL = cluster.getNodes().iterator().next().getSocketUrl().toString();
for (Node node : cluster.getNodes()) {
SocketStoreFactory ssf = new ClientRequestExecutorPool(2, 10000, 100000, 1024);
VoldemortConfig config = ServerTestUtils.createServerConfigWithDefs(true, node.getId(), TestUtils.createTempDir().getAbsolutePath(), cluster, oldStores, new Properties());
VoldemortServer vs = ServerTestUtils.startVoldemortServer(ssf, config, cluster);
vservers.put(node.getId(), vs);
socketStoreFactories.put(node.getId(), ssf);
}
adminClient = new AdminClient(cluster);
}
use of voldemort.store.socket.clientrequest.ClientRequestExecutorPool in project voldemort by voldemort.
the class SetMetadataTest method setup.
/**
* This test is to partially test the functionality of SetMetadata feature
* of the VoldemortAdminTool
*/
@Before
public void setup() throws IOException {
// setup cluster
cluster = ClusterTestUtils.getZZZCluster();
oldStores = ClusterTestUtils.getZZZStoreDefsInMemory();
bsURL = cluster.getNodes().iterator().next().getSocketUrl().toString();
for (Node node : cluster.getNodes()) {
SocketStoreFactory ssf = new ClientRequestExecutorPool(2, 10000, 100000, 1024);
VoldemortConfig config = ServerTestUtils.createServerConfigWithDefs(true, node.getId(), TestUtils.createTempDir().getAbsolutePath(), cluster, oldStores, new Properties());
VoldemortServer vs = ServerTestUtils.startVoldemortServer(ssf, config, cluster);
vservers.put(node.getId(), vs);
socketStoreFactories.put(node.getId(), ssf);
}
}
use of voldemort.store.socket.clientrequest.ClientRequestExecutorPool in project voldemort by voldemort.
the class StoreOperationsTest method setup.
@Before
public void setup() throws IOException {
// setup cluster
cluster = ServerTestUtils.getLocalCluster(2);
stores = ServerTestUtils.getStoreDefs(2);
bsURL = cluster.getNodes().iterator().next().getSocketUrl().toString();
for (Node node : cluster.getNodes()) {
SocketStoreFactory ssf = new ClientRequestExecutorPool(2, 10000, 100000, 1024);
VoldemortConfig config = ServerTestUtils.createServerConfigWithDefs(true, node.getId(), TestUtils.createTempDir().getAbsolutePath(), cluster, stores, new Properties());
VoldemortServer vs = ServerTestUtils.startVoldemortServer(ssf, config, cluster);
vservers.put(node.getId(), vs);
socketStoreFactories.put(node.getId(), ssf);
}
adminClient = new AdminClient(cluster);
}
use of voldemort.store.socket.clientrequest.ClientRequestExecutorPool in project voldemort by voldemort.
the class ConsistencyFixTest method setUpCluster.
/**
*
* @return bootstrap url
*/
public static String setUpCluster() {
// setup four nodes with one store and one partition
final SocketStoreFactory socketStoreFactory = new ClientRequestExecutorPool(2, 10000, 100000, 32 * 1024);
VoldemortServer[] servers = new VoldemortServer[4];
int[][] partitionMap = { { 0 }, { 1 }, { 2 }, { 3 } };
try {
Cluster cluster = ServerTestUtils.startVoldemortCluster(4, servers, partitionMap, socketStoreFactory, true, null, STORES_XML, new Properties());
Node node = cluster.getNodeById(0);
return "tcp://" + node.getHost() + ":" + node.getSocketPort();
} catch (IOException e) {
e.printStackTrace();
fail("Unexpected exception");
}
return null;
}
Aggregations