use of voldemort.server.VoldemortConfig in project voldemort by voldemort.
the class RocksdbStorageEngineAPITest method setup.
@Before
public void setup() {
Properties props = new Properties();
// Doesnt matter what node.id and voldemort.home values are for this
// test
props.setProperty("node.id", "0");
props.setProperty("voldemort.home", "tmp/voldemort");
voldemortConfig = new VoldemortConfig(props);
if (this.prefixPartitionId) {
voldemortConfig.setRocksdbPrefixKeysWithPartitionId(true);
}
this.rocksDbConfig = new RocksDbStorageConfiguration(voldemortConfig);
this.rocksDbStore = (RocksDbStorageEngine) rocksDbConfig.getStore(TestUtils.makeStoreDefinition("test"), TestUtils.makeSingleNodeRoutingStrategy());
random = new Random();
}
use of voldemort.server.VoldemortConfig 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.server.VoldemortConfig in project voldemort by voldemort.
the class ZoneShrinkageCLITest method setup.
public void setup() throws IOException {
// setup cluster
bsURL = cluster.getNodes().iterator().next().getSocketUrl().toString();
for (Node node : cluster.getNodes()) {
SocketStoreFactory ssf = new TestSocketStoreFactory();
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.server.VoldemortConfig 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.server.VoldemortConfig 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);
}
}
Aggregations