+ " since it is not a RW store");
}
StorageEngine<ByteArray, byte[], byte[]> storageEngine = getStorageEngine(storeRepository,
storeName);
VoldemortFilter filter = (request.hasFilter()) ? getFilterFromRequest(request.getFilter(),
voldemortConfig,
networkClassLoader)
: new DefaultVoldemortFilter();
EventThrottler throttler = new EventThrottler(voldemortConfig.getStreamMaxReadBytesPerSec());
iterator = storageEngine.entries();
long deleteSuccess = 0;
logger.info("Deleting entries for RW store " + storeName + " from node "
+ metadataStore.getNodeId() + " ( " + storeName + " )");
while(iterator.hasNext()) {
Pair<ByteArray, Versioned<byte[]>> entry = iterator.next();
ByteArray key = entry.getFirst();
Versioned<byte[]> value = entry.getSecond();
throttler.maybeThrottle(key.length() + valueSize(value));
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);