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
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/998cd164 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/998cd164 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/998cd164 Branch: refs/heads/master Commit: 998cd1642f4ae3819f18061468755bf992257a52 Parents: 481a116 Author: Enis Soztutar <[email protected]> Authored: Thu Feb 13 01:56:11 2014 +0000 Committer: Enis Soztutar <[email protected]> Committed: Fri Jun 27 16:39:36 2014 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hbase/client/MetaCache.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/998cd164/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java index b8cd429..10a48ae 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java @@ -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);
