Package voldemort.client.protocol

Examples of voldemort.client.protocol.VoldemortFilter.accept()


        RoutingStrategy strategy = new RoutingStrategyFactory().updateRoutingStrategy(getStoreDef(),
                                                                                      getCluster());
        for(Pair<ByteArray, Versioned<byte[]>> pair: createEntries()) {
            if(Utils.nodeListToNodeIdList(strategy.routeRequest(pair.getFirst().get())).contains(0)) {
                store.put(pair.getFirst(), pair.getSecond(), null);
                if(!filter.accept(pair.getFirst(), pair.getSecond())) {
                    shouldFilterCount++;
                }
            }
        }
View Full Code Here


                                                                                                                false);

        // assert none of the filtered entries are returned.
        while(entryIterator.hasNext()) {
            Pair<ByteArray, Versioned<byte[]>> entry = entryIterator.next();
            if(!filter.accept(entry.getFirst(), entry.getSecond())) {
                fail();
            }
        }
    }
View Full Code Here

                                                      filter);

        // assert none of the filtered entries are returned.
        for(Pair<ByteArray, Versioned<byte[]>> entry: entrySet) {
            if(Utils.nodeListToNodeIdList(strategy.routeRequest(entry.getFirst().get())).contains(0)) {
                if(filter.accept(entry.getFirst(), entry.getSecond())) {
                    assertEquals("All entries should be deleted except the filtered ones.",
                                 0,
                                 store.get(entry.getFirst(), null).size());
                } else {
                    assertNotSame("filtered entry should be still present.",
View Full Code Here

        Store<ByteArray, byte[], byte[]> store = getStore(0, testStoreName);

        assertNotSame("Store '" + testStoreName + "' should not be null", null, store);

        for(Pair<ByteArray, Versioned<byte[]>> entry: entrySet) {
            if(filter.accept(entry.getFirst(), entry.getSecond())) {
                assertEquals("Store should have this key/value pair",
                             1,
                             store.get(entry.getFirst(), null).size());
                assertEquals("Store should have this key/value pair",
                             entry.getSecond(),
View Full Code Here

                if(StoreRoutingPlan.checkKeyBelongsToNode(key.get(),
                                                          metadataStore.getNodeId(),
                                                          request.hasInitialCluster() ? new ClusterMapper().readCluster(new StringReader(request.getInitialCluster()))
                                                                                     : metadataStore.getCluster(),
                                                          metadataStore.getStoreDef(storeName))
                   && filter.accept(key, value)) {
                    if(storageEngine.delete(key, value.getVersion())) {
                        deleteSuccess++;
                        if((deleteSuccess % 10000) == 0) {
                            logger.info(deleteSuccess + " entries deleted from node "
                                        + metadataStore.getNodeId() + " for store " + storeName);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.