use of com.linkedin.d2.balancer.properties.UriPropertiesJsonSerializer in project rest.li by linkedin.
the class SimpleLoadBalancerTest method testLoadBalancerSimulationDegraderWithFileStore.
@Test(groups = { "medium", "back-end" })
public void testLoadBalancerSimulationDegraderWithFileStore() throws URISyntaxException, IOException, ServiceUnavailableException, InterruptedException {
SimpleLoadBalancerSimulation simulator = new SimpleLoadBalancerSimulation(new DegraderLoadBalancerStrategyFactoryV3(), new FileStoreTestFactory<ClusterProperties>("cluster", new ClusterPropertiesJsonSerializer()), new FileStoreTestFactory<ServiceProperties>("service", new ServicePropertiesJsonSerializer()), new FileStoreTestFactory<UriProperties>("uri", new UriPropertiesJsonSerializer()));
simulator.simulateMultithreaded(1, 1000, 20);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 20);
simulator.reset();
}
use of com.linkedin.d2.balancer.properties.UriPropertiesJsonSerializer in project rest.li by linkedin.
the class SimpleLoadBalancerTest method testLoadBalancerSimulationDegraderWithFileStoreLarge.
@Test(enabled = false, groups = { "large", "back-end" })
public void testLoadBalancerSimulationDegraderWithFileStoreLarge() throws URISyntaxException, IOException, ServiceUnavailableException, InterruptedException {
SimpleLoadBalancerSimulation simulator = new SimpleLoadBalancerSimulation(new DegraderLoadBalancerStrategyFactoryV3(), new FileStoreTestFactory<ClusterProperties>("cluster", new ClusterPropertiesJsonSerializer()), new FileStoreTestFactory<ServiceProperties>("service", new ServicePropertiesJsonSerializer()), new FileStoreTestFactory<UriProperties>("uri", new UriPropertiesJsonSerializer()));
simulator.simulateMultithreaded(1, 1000, 20);
simulator.reset();
simulator.simulateMultithreaded(1, 10000, 20);
simulator.reset();
simulator.simulateMultithreaded(8, 10000, 750);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 100);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 100);
simulator.reset();
}
use of com.linkedin.d2.balancer.properties.UriPropertiesJsonSerializer in project rest.li by linkedin.
the class ZookeeperConnectionManagerTest method createAndStartUriStore.
private ZooKeeperEphemeralStore<UriProperties> createAndStartUriStore() throws IOException, ExecutionException, InterruptedException {
ZKConnection zkClient = new ZKConnection("localhost:" + PORT, 5000);
zkClient.start();
ZooKeeperEphemeralStore<UriProperties> store = new ZooKeeperEphemeralStore<UriProperties>(zkClient, new UriPropertiesJsonSerializer(), new UriPropertiesMerger(), "/d2/uris");
FutureCallback<None> callback = new FutureCallback<None>();
store.start(callback);
callback.get();
return store;
}
Aggregations