Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Linux
-
Reviewed
Description
The following is the problem
Get the exact region name from UI and call
HBaseAdmin.unassign(regionname, true).
Here true is forceful option.
As part of unassign api
public void unassign(final byte [] regionName, final boolean force) throws IOException { Pair<HRegionInfo, HServerAddress> pair = MetaReader.getRegion(this.catalogTracker, regionName); if (pair == null) throw new UnknownRegionException(Bytes.toStringBinary(regionName)); HRegionInfo hri = pair.getFirst(); if (force) this.assignmentManager.clearRegionFromTransition(hri); this.assignmentManager.unassign(hri, force); }
As part of clearRegionFromTransition()
synchronized (this.regions) { this.regions.remove(hri); for (Set<HRegionInfo> regions : this.servers.values()) { regions.remove(hri); } }
the region is also removed. Hence when the master tries to identify the region
if (!regions.containsKey(region)) { debugLog(region, "Attempted to unassign region " + region.getRegionNameAsString() + " but it is not " + "currently assigned anywhere"); return; }
It is not able to identify the region. It exists in trunk and 0.90.x also.