HBASE-10517 NPE in MetaCache.clearCache()

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-10070@1567827 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Enis Soztutar 2014-02-13 01:56:11 +00:00
parent 481a116e26
commit 998cd1642f
1 changed files with 3 additions and 0 deletions

View File

@ -329,6 +329,9 @@ public class MetaCache {
TableName tableName = location.getRegionInfo().getTable();
ConcurrentMap<byte[], RegionLocations> tableLocations = getTableLocations(tableName);
RegionLocations rll = tableLocations.get(location.getRegionInfo().getStartKey());
if (rll == null) {
return;
}
RegionLocations updatedLocations = rll.remove(location);
if (updatedLocations.isEmpty()) {
tableLocations.remove(location.getRegionInfo().getStartKey(), rll);