Package voldemort.serialization

Examples of voldemort.serialization.ByteArraySerializer


            StorageService ss = (StorageService) vsrv;
            voldemortServers.put(nodeId, vs);

            slopStorageEngines.put(nodeId, ss.getStoreRepository().getSlopStore());
            slopStores.put(nodeId, SerializingStore.wrap(ss.getStoreRepository().getSlopStore(),
                                                         new ByteArraySerializer(),
                                                         new SlopSerializer(),
                                                         new IdentitySerializer()));
            // wrap original store with force fail store
            Store<ByteArray, byte[], byte[]> store = ss.getStoreRepository()
                                                       .removeLocalStore(STORE_NAME);
            UnreachableStoreException exception = new UnreachableStoreException("Force failed");
            ForceFailStore<ByteArray, byte[], byte[]> forceFailStore = new ForceFailStore<ByteArray, byte[], byte[]>(store,
                                                                                                                     exception);
            forceFailStores.put(nodeId, forceFailStore);
            ss.getStoreRepository().addLocalStore(forceFailStore);
        }

        strategy = new RoutingStrategyFactory().updateRoutingStrategy(storeDef, cluster);

        // create client socket stores and slop stores
        SocketStoreClientFactoryForTest clientSocketStoreFactory = new SocketStoreClientFactoryForTest(STORE_NAME,
                                                                                                       SLOP_STORE_NAME);
        Serializer<ByteArray> slopKeySerializer = new ByteArraySerializer();
        Serializer<Slop> slopValueSerializer = new SlopSerializer();
        Map<Integer, Store<ByteArray, byte[], byte[]>> testStores = subStores;
        Map<Integer, Store<ByteArray, Slop, byte[]>> slopStores = new HashMap<Integer, Store<ByteArray, Slop, byte[]>>();
        for(Node node: cluster.getNodes()) {
            // test store
View Full Code Here


        slopStats.setAll(SlopStats.Tracked.OUTSTANDING, newValues);
    }

    public StorageEngine<ByteArray, Slop, byte[]> asSlopStore() {
        return SerializingStorageEngine.wrap(this,
                                             new ByteArraySerializer(),
                                             slopSerializer,
                                             new IdentitySerializer());
    }
View Full Code Here

        }
    }

    @Test(timeout = 60000)
    public void testAllServersSendingOutSlopsCorrectly() throws InterruptedException {
        final Serializer<ByteArray> slopKeySerializer = new ByteArraySerializer();
        final Serializer<Slop> slopValueSerializer = new SlopSerializer();
        final SlopSerializer slopSerializer = new SlopSerializer();

        StoreDefinition storeDef = storeDefs.get(0);
        TestSocketStoreFactory ssf = new TestSocketStoreFactory();
View Full Code Here

TOP

Related Classes of voldemort.serialization.ByteArraySerializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.