use of voldemort.server.StoreRepository in project voldemort by voldemort.
the class StorageServiceTest method setUp.
@Override
@Before
public void setUp() {
// this is turned off by default
config.setEnableServerRouting(true);
metadataDir = new File(config.getMetadataDirectory());
metadataDir.mkdir();
config.setBdbCacheSize(100000);
this.scheduler = new SchedulerService(1, new MockTime());
this.storeRepository = new StoreRepository();
storage = new StorageService(storeRepository, mdStore, scheduler, config);
storage.start();
}
use of voldemort.server.StoreRepository in project voldemort by voldemort.
the class NioSelectorManagerTest method setUp.
@Before
public void setUp() throws IOException {
this.port = ServerTestUtils.findFreePort();
StoreRepository repository = new StoreRepository();
sleepyStore = new SleepyStore<ByteArray, byte[], byte[]>(Long.MAX_VALUE, new InMemoryStorageEngine<ByteArray, byte[], byte[]>(STORE_NAME));
repository.addLocalStore(sleepyStore);
repository.addRoutedStore(sleepyStore);
this.pool = new ClientRequestExecutorPool(50, 300, 250, 32 * 1024);
this.dest1 = new SocketDestination("localhost", port, RequestFormatType.VOLDEMORT_V1);
final Store<ByteArray, byte[], byte[]> socketStore = pool.create(STORE_NAME, "localhost", port, RequestFormatType.VOLDEMORT_V1, RequestRoutingType.NORMAL);
factory = ServerTestUtils.getSocketRequestHandlerFactory(repository);
socketService = ServerTestUtils.getSocketService(true, factory, port, numSelectors, 10, 1000, MAX_HEART_BEAT_MS);
socketService.start();
}
use of voldemort.server.StoreRepository in project voldemort by voldemort.
the class SocketPoolTest method setUp.
@Override
@Before
public void setUp() {
this.port = ServerTestUtils.findFreePort();
this.pool = new SocketPool(maxConnectionsPerNode, 1000, 1000, 32 * 1024);
this.dest1 = new SocketDestination("localhost", port, RequestFormatType.VOLDEMORT_V1);
RequestHandlerFactory handlerFactory = ServerTestUtils.getSocketRequestHandlerFactory(new StoreRepository());
this.server = ServerTestUtils.getSocketService(useNio, handlerFactory, port, 10, 10 + 3, 10000);
this.server.start();
}
use of voldemort.server.StoreRepository in project voldemort by voldemort.
the class ClientRequestExecutorPoolTest method startServer.
private void startServer() {
RequestHandlerFactory handlerFactory = ServerTestUtils.getSocketRequestHandlerFactory(new StoreRepository());
this.server = ServerTestUtils.getSocketService(useNio, handlerFactory, port, 10, 10 + 3, 10000);
this.server.start();
}
Aggregations