assertNotSame("Store '" + testStoreName + "' should not be null", null, store);
Set<Pair<ByteArray, Versioned<byte[]>>> entrySet = createEntries();
VoldemortFilter filter = new VoldemortFilterImpl();
RoutingStrategy strategy = new RoutingStrategyFactory().updateRoutingStrategy(getStoreDef(),
getCluster());
for(Pair<ByteArray, Versioned<byte[]>> pair: entrySet) {
if(Utils.nodeListToNodeIdList(strategy.routeRequest(pair.getFirst().get())).contains(0))
store.put(pair.getFirst(), pair.getSecond(), null);
}
// make delete stream call with filter
getAdminClient().storeMntOps.deletePartitions(0,
testStoreName,
Lists.newArrayList(0, 1),
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 {