Search in sources :

Example 1 with NoopFailureDetector

use of voldemort.cluster.failuredetector.NoopFailureDetector in project voldemort by voldemort.

the class BlockingSlopPusherTest method setUp.

@Override
protected void setUp() throws Exception {
    Cluster cluster = makeCluster(3);
    repo = new StoreRepository();
    repo.setSlopStore(new SlopStorageEngine(new InMemoryStorageEngine<ByteArray, byte[], byte[]>("slop"), cluster));
    repo.addNodeStore(0, new InMemoryStorageEngine<ByteArray, byte[], byte[]>(STORE_NAME));
    repo.addNodeStore(1, new InMemoryStorageEngine<ByteArray, byte[], byte[]>(STORE_NAME));
    repo.addNodeStore(2, new FailingStore<ByteArray, byte[], byte[]>(STORE_NAME));
    MetadataStore metadataStore = ServerTestUtils.createMetadataStore(cluster, ServerTestUtils.getStoreDefs(1));
    Props props = new Props();
    props.put("node.id", 0);
    props.put("voldemort.home", "/");
    pusher = new BlockingSlopPusherJob(repo, metadataStore, new NoopFailureDetector(), new VoldemortConfig(props), new ScanPermitWrapper(1));
}
Also used : BlockingSlopPusherJob(voldemort.server.scheduler.slop.BlockingSlopPusherJob) NoopFailureDetector(voldemort.cluster.failuredetector.NoopFailureDetector) ScanPermitWrapper(voldemort.server.storage.ScanPermitWrapper) Cluster(voldemort.cluster.Cluster) StoreRepository(voldemort.server.StoreRepository) Props(voldemort.utils.Props) VoldemortConfig(voldemort.server.VoldemortConfig) MetadataStore(voldemort.store.metadata.MetadataStore) InMemoryStorageEngine(voldemort.store.memory.InMemoryStorageEngine) ByteArray(voldemort.utils.ByteArray) SlopStorageEngine(voldemort.store.slop.SlopStorageEngine)

Example 2 with NoopFailureDetector

use of voldemort.cluster.failuredetector.NoopFailureDetector in project voldemort by voldemort.

the class GetallNodeReachTest method makeStore.

private void makeStore() {
    subStores = Maps.newHashMap();
    for (Node n : cluster.getNodes()) {
        Store<ByteArray, byte[], byte[]> subStore = new InMemoryStorageEngine<ByteArray, byte[], byte[]>("test");
        subStores.put(n.getId(), subStore);
    }
    RoutedStoreFactory routedStoreFactory = new RoutedStoreFactory(Executors.newFixedThreadPool(2));
    store = routedStoreFactory.create(cluster, storeDef, subStores, new NoopFailureDetector(), new RoutedStoreConfig().setTimeoutConfig(new TimeoutConfig(1000L)));
}
Also used : TimeoutConfig(voldemort.client.TimeoutConfig) InMemoryStorageEngine(voldemort.store.memory.InMemoryStorageEngine) NoopFailureDetector(voldemort.cluster.failuredetector.NoopFailureDetector) Node(voldemort.cluster.Node) ByteArray(voldemort.utils.ByteArray)

Aggregations

NoopFailureDetector (voldemort.cluster.failuredetector.NoopFailureDetector)2 InMemoryStorageEngine (voldemort.store.memory.InMemoryStorageEngine)2 ByteArray (voldemort.utils.ByteArray)2 TimeoutConfig (voldemort.client.TimeoutConfig)1 Cluster (voldemort.cluster.Cluster)1 Node (voldemort.cluster.Node)1 StoreRepository (voldemort.server.StoreRepository)1 VoldemortConfig (voldemort.server.VoldemortConfig)1 BlockingSlopPusherJob (voldemort.server.scheduler.slop.BlockingSlopPusherJob)1 ScanPermitWrapper (voldemort.server.storage.ScanPermitWrapper)1 MetadataStore (voldemort.store.metadata.MetadataStore)1 SlopStorageEngine (voldemort.store.slop.SlopStorageEngine)1 Props (voldemort.utils.Props)1