Pivotal Knowledge Base

Follow

GFSH Remove /RegionName --All is not Supported on Partitioned Regions

Environment

Pivotal GemFire Versions 7.0.1.x,702.x,8.0.x, 8.1.x, 8.2.0.x, and 8.2.1.x

Symptom

GFSH does not support remove /regionName --all operation.

gfsh>remove --region=/part --all

It gives the below error:

gfsh>remove --region=/part --all
Result  : false
Message : Option --all is not supported on partitioned region

Cause

The command, gfsh> remove --region=/part --all** essentially translates into a region.clear(), which is still not supported for partitioned regions. Gemfire does not support putAll, getAll from gfsh, so support for removeAll is not added.

Resolution

The workaround is basically to use a client to clear the region. Something like this:

Region<String, String> region = cache.getRegion("regionName");
Set<String> keySet = region.keySetOnServer();
region.removeAll(keySet);

where **regionName** is cofigured like below in the gemfire client configurations.

<region name="regionName" refid="PROXY" />

Comments

Powered by Zendesk